Function that returns a new double array.
Returns a new double array of size elements.
size
Integer that represents the number of elements in the new array.