Typescript Change Position In Array Postgres