Here is the code that causes the glitch:
<<set $array1 = ["X","Y","Z"]>><<set $array2 = ["A", $array1]>>
<<print $array2>> -> returns: ["A",["X","Y","Z"]]
<<set $array1[1] = "N">>
<<print $array2>> -> still returns: ["A",["X","Y","Z"]]
How can I fix this so that array2 is updated wheneve array1 is?