With just the snippet above, quotation marks should not be getting removed.
However, they would not be printed out if you were trying to display/use one of the elements of the array. i.e. you would need to something like this get the quotation marks printed out:
['"hello"', '"world"']
It would be helpful to have some more context.
What is the JavaScript error you are getting?
Can you be more specific about what you are doing with ${user.arrayTest}?
Is it possible to share the page on which you are trying to implement this custom code? a link to the page, the page code, etc.
- Carey