Postgres Function Select Into Array Methods In React