Numpy Create Index Array Javascript Append To Beginning