[PATCH v3 06/12] minmax: Introduce {min,max}_array()