in reply to removing elements from an array

Think of it as iterating through the existing array and creating a new array containing only what you want. Then, if you wish, empty out the old array. The approach can actually be more efficient than you suppose.