My questions: How to use "Timer" or "Sensor" to toggle between "Subroutine-A" and "Subroutine-B" easily?
It sounds like a trivial question, but you don't explain what 'enabling' a subroutine means.
If you design your sketch following the approach demonstrated in the 'blink without delay' example then your two subroutines can each be implemented as a function called repeatedly to execute whichever piece of logic you want 'enabled'. In that case you can simply have a global variable that indicates which of the functions to call, and in loop() you will simply test the value of that variable and call one or other function. To change which function gets called you simply update the global variable, and you can do that whenever you want based on whatever conditions you want - such as based on a timer, or based on the state of an input.