There are several ways to do it. But first question: does the order matter? You only said you wanted to keep the others in the array, you didn't say you wanted to keep the order. If order don't matter, you can just replace item 20 with item 24 (assuming you start numbering from zero...), then erase item 24. If order matters, you need to move item 21 to 24 into items 20 to 23.
In a REAL database program, you might want to use an index to keep track of the proper order of the items in the array, then simply put the last item in the array into any deleted items. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."