https://medium.com/@asierr/array-group-vs-reduce-vs-map-groupby-which-should-you-use-in-2025-91d7b1f66cce