Get the max or the min in an array of numbers