Add helper function to transform a range of string elements into a T[]