Postgresql Plpgsql Loop Through Array Jquery Ui Icons