Postgresql Group By Array Agg Postgresql Data Type