Postgresql Order By Array Position Python