Computes the maximum value of an array.