delete repeat elements in array