Your array is an object which lives on the heap (somewhere in memory). It exists there as long as there is at least one active reference in your program pointing to it.
You can think of a reference as just a link or pointer to your array. The reference is typically just a small value that tells your program how to get to the object you care about at its memory address. Let's say the reference points to memory address 100. When you pass the reference to a method, it is passed by value, so the method gets a copy of the reference. A new value of 100 enters the method.
When you try to do something to the array in that method, the value of the reference is considered and used to gain access to the object in memory. So, we look up address 100, get the object we care about and finish.
Once you exit your method, the value of the reference inside the method disappears (it was a local variable), but outside the method you still have a copy of the reference, and you can still use it to access address 100 where your object is.
So we just get the perception that the object is passed by reference, when instead the object is always in the same place in memory, and we are just passing a reference value which gets copied. Since the copy has the same value address as outside the method, we can gain access to the same object.