Postgresql Create Array Js Slice