as a class, as a struct, as a vector or something else.
All of the above? It's not going to be "a" class or "a" vector. You're asking for a syntactical solution to a complex question of data structures and algorithms.
A typical way of dealing with this is keeping a list of events. For instance, something like:
enum class FrameEventTypes
double time =0.0;
int layerId = 0;
FrameEventTypes type = FrameEventTypes::Show;
double time = 0.0;
size_t next = 0;
void ExecuteEvent(size_t index);
void Update(double delta_time);
The list of events is sorted in order of `time`. Then you iterate over the list of events with a delta time and execute them as needed:
void Frame::Update(double dt)
time += dt;
while (next < events.size() && events[next].time <= time)
void Frame::ExecuteEvent(size_t index)
And then you can add in more events as needed. You might have events to add or remove elements, show or hide individual elements, play sounds, run animations, whatever.