Unpatch arrays in `each` when changing arrays

See the new test. When changing the array, modifications on the old one will still be handled.