Getting arrays and strings the right way around