Postgres Aggregate Into Array Initialization Javascript Interview