Note that I've had to re-initialize the array since `remove` has side-effects.