This is why musicians play scales and arpeggios. Nobody really cares about scales or arpeggios. But when you run into a long sequence of them in some piece you are studying, it makes the difference between sight reading it and spending a week learning it.
FWIW, I think this is also why Design Patterns in SW Engineering is important. They are roles for programs.