In my library a point in an array deletes itself too quickly

Sorry for the terrible title, I didn't really know how to sum up my problem in a sentence. So: I created a library with the purpose of making motors a little easier to control and introduce non-halting delays. In my test setup what should happen is I press a button, an led lights up, delayStart() is called causing data points to be added to a couple arrays giving info about the delay (what to do after it's over, how long it lasts, etc.) and once the timer is up delayHandle notices that, turns the led off, and then calls delayCleanup which clears the spaces in the arrays that the delay took up. There are also the motor commands I haven't even started testing yet because they require the delay system to be working.

My main problem is that the LED never turns off. Through serial monitor, I was able to gather that when the button was pressed the time was added to delayEnds but it was almost immediately cleared (within 1-10 loops, how long it takes delayHandle to get through the possible delay spaces) when delayCleanup should not have been called. So this basically makes my program useless. Sorry for not making my goal/problem/method super clear, but this was the best I could do. There are probably multiple problems in my code.

There are probably multiple problems in my code.

Right.

There are probably multiple problems in my code.

None of the code that you have not posted appears to have problems

Are you keeping it a secret ?

As per posts above, refer to point seven - https://forum.arduino.cc/index.php/topic,148850.0.html