How to insert an item into an array at a specific index in JavaScript