How do I write a for-loop in Swift 3 for an array that I modify during the for loop? How do I write a for-loop in Swift 3 for an array that I modify during the for loop? ios ios