Array min&max

Change array.min and array.max to return the element of array when is passed a function.