Postgresql Loop Through Array Backwards Slash