I would agree with Ori that your question seems to be related to creating an indexed object, which is usually not a good plan, but if your object with numbers is necessary for the key, you can do it like this:
let newObj = {};
myArray.forEach((val, index) => { newObj[index] = val });