Implemented indexed min and max reductions