create new instance of array javascript