This isn't a good idea as you are removing entries from the array. In many cases this will be referencing the array that is pointed to by an actual variable so you are deleting the keys from there too. e.g.

    get the properties of me
    set the properties of me to it
    put "rect" is among the keys of it


Will result in false.