you could look at the following examples
- Using millis() for timing. A beginners guide
- Several things at the same time
- Flashing multiple LEDs at the same time
and you might benefit from studying state machines and common constructs (enum, switch/case, ...). Here is a small introduction to the topic: Yet another Finite State Machine introduction