Every time this function is run, you'll get a new array object on the heap. If that happens once per frame (or more) you'll create a lot of garbage. In Chrome that's not so bad because V8 uses a generational garbage collector, but you'll get a lot of stuttering in Firefox.

It would be better to have three separate functions: `getCoordX`, `getCoordY`, and `getCoordZ` and keep the values in individual variables.