Javascript Create New Array From Old Arraylist Length