Extract converting array to a string to a helper method