I'm certainly no expert here, but I think you need some kind of abstraction for a task. The abstraction needs to include what task to run, and wether the task is ready to execute. You might do something like:
typedef struct {
bool isReady;
void (*taskFunc)();
} Task;
This struct holds a pointer to a task function, and a boolean flag indicating wether it should be run. You'd need to store a list of these, and iterate over the list every time you're in the running state. Once you have that working, you can start to add features. Time to next ready, priority, some kind of yield mechanism that makes it easier to wait for an interrupt, etc...