There is a great essay by early music scholar and performer Nicola Cumer you can find here on Spiridionis that explains how to use a passacaglia bass line to improve your improvising skills. There are all kinds of fun ideas in here that I think can be applied in a wide range of ways to instantly start understanding how the music you are playing is put together. Improvising goes a long way to develop stylistic fluency and confidence, and by using a simple loop you can apply this idea to essentially any piece.
The idea here is simple: just because a piece doesn’t use repeating patterns in the left hand doesn’t mean you can’t turn them into repeating patterns for the sake of learning. Find a section with a coherent number of measures, preferably a multiple of four like four, eight, twelve, or sixteen. Now you are going to remove the right hand part and just play the left hand alone. When you get to the end of that section, just start the same section again and play it in a loop. Once you are in the groove of doing that a few times, its time to let your right hand start coming up with ideas. I am not going to deal in this post with how to make decisions about what your right hand should play to sound stylistically appropriate. However, each time you loop through the section you chose, allow your right hand to play something new while your left hand stays the same. This will give you a chance to try the same thing multiple times and get a sense of what ideas you can come up with in the right hand that match.
The reason I would call this a passacaglia is because the passacaglia is a musical form where the left hand bass line stays the same through the whole piece. The right hand melody, on the other hand, changes each time. It’s kind of like a theme and variations, except the left hand is much more consistent, and the section is usually much shorter. For those who have heard the term chaconne, it is pretty much identical to a chaconne or a ground bass. The clever idea here is to look for places in pieces that are NOT passacaglias or chaconnes that could nevertheless be turned INTO passacaglias by repeating them over and over again. This gives you a way to really internalize the way a particular phrase structure works and explore many options in your right hand improvisation within a clear constraint.
Nicola Cumer found this idea in a treatise by Spiridionis but the idea applies to music of all eras. Try it in a piece of music you are already playing: find one eight measure section that you could repeat the left hand on in a loop. Then, as you go through it each time, give your right hand a chance to try small variations, then big variations, then totally whatever comes into your head. This is a great way that anyone can move from simply playing the notes on the page to understanding how the music they are playing is put together and get better at improvising on top of that.