for var index = self.indexOfObject(object); index != NSNotFound; index = self.indexOfObject(object)
is for loop in C-style and has been removed
Change your code to something like this to remove all similar object if it have looped:
let indexes = arrContacts.enumerated().filter { $0.element == contacts[indexPath.row] }.map{ $0.offset }
for index in indexes.reversed() {
arrContacts.remove(at: index)
}