Deleting a particular element from an array