Search and remove an item from an array