Javascript Append To Array At Index