Javascript Spread Array Into Arraylist And Linkedlist