Correct data string generation to support arrays.