You cannot, that's how arrays work, they need to have indexes for values those are automatically set if you don't provide any of yours.
That's just how it works, in javascript, you can assign index, but it then becomes a JSON, not an array, but there cannot be a value in an array without index.