JS different typr of arrays and manipulating their order