Splits a flat array into groups by GroupResolver.by — preserves order by each key's first appearance (data already sorted by the DB keeps that group order); sortGroups can override this.
Splits a flat array into groups by GroupResolver.by — preserves order by each key's first appearance (data already sorted by the DB keeps that group order); sortGroups can override this.