I\'ve so far got a simple (but potentially expensive) way:
var myMax = sort(myArray,>)[0]
And how I was taught to do it at school:
You can also sort your array and then use array.first or array.last
array.first
array.last