YEP_Buffstatecore, storing and reapplying states

I'm looking for some code for a state effect, to store and remove a battler's (in this case enemy) states and buffs + the durations and then reapply it at a later time. I believe the best way to do this is using Arrays but I haven't quite delved there yet so any help would be appreciated.
bump

Original thread: https://forums.rpgmakerweb.com/threads/yep_buffstatecore-storing-and-reapplying-states.107951/