Iterate over copy of array to prevent mutation exceptions