method to remove dupes from an array
cleared removeWithoutCopy in array.js