Arrays and Dictionaries are passed via Reference. Introducing variable A like this makes it a reference to Array B, like a link to it. Any changes to A will be applied to variable it is linking its reference. The same things happen with Nodes. If You make variable A = get_node(“something”) and later You will do : A = get_node(“somethingdifferent”) - it will not change one node to the other, it will only change which Node will be referred when calling A.
If You want variable A to become new array, that is the same as var B, then You have to use duplicate() method :