This is a shallow copy and only really works on an array of strings, but that's okay because of the input type. I needed this because I compare the original array in some code.