Postgres Loop Through Array Backwards E