Postgres Window Function Array