Postgres Function Select Into Arraylist Creation