Js Add Index To Array Of Pointers