If you store an array return value when using getVariable, it will create a pointer and not a new array. If you use set command for the return value, it will do the same for the variable in the variable space.
I created a repro mission and the hint messages will guide you through it, step by step. {F22508}