Postgres Flatten Array Numpy Ninja