One easy way to handle delete from an array is to start from the end. That skips the problem when you delete an index in an array while moving forward it usally makes you skip the next item.
So you could do something like this :
Feel free to ask if this is not clear
Hope this helps
- Marc