REF: deduplicate group cummin/max
After #40584, may as well do this one too.
any perf diffs? 

OT: we ought to consider just computing *both* at the same time (but this would require more processing because then we have to look for min/max and then dispatch, so prob not worth it) > any perf diffs?
> 
> OT: we ought to consider just computing _both_ at the same time (but this would require more processing because then we have to look for min/max and then dispatch, so prob not worth it)

ASV's were unaffected. What do you mean by computing both at the same time? As in an enhancement to provide functionality for computing both min/max simultaneously? > What do you mean by computing both at the same time? As in an enhancement to provide functionality for computing both min/max simultaneously?

yes, its more efficient to do this if you *know* that you want *both* min and max.