You're describing array of structs vs. struct of arrays. Even in JavaScript, you would have to manually do the latter.
And the manually manager int array acts more like system memory, it's not continuous, so you could have point i 0 and 2 and the data would be: [1, 2, 3, x, x,x, 3, 2, 1] (3D points).
So I am not describing a struct of arrays.
It doesn't make JS faster than Java, it makes it almost as fast in some cases.
It's also many versions behind the Java API (depending on when it happened).
So your data point is basically completely irrelevant.
The optimization you discussed for GIS data is called struct of arrays. JavaScript does not do that automatically for you. You would have to do the same thing manually in JavaScript to avoid per-triple object overhead.