Javascript Replace Array With Another Arraylist And Hashset