Postgres Find Position In Array Matlab