max of a generic array