One can view chord scale relationships in at least two ways. In my experience the more common approach in modern improv is to think of which mode fits over which chord. This relation is "invertible" in the sense that one can think about which chords exist in each mode or scale. This is how I learned the relation in classical harmony theory. The former is how it was presented in Jazz improv, e.g. Jamey Abersold etc.
Realizing that all 7 diatonic modes are just shifted copies of the Major scale, and similarly for the melodic minor modes, you really only have 2 scales to learn (depending on your instrument).
If you think of each chord in isolation then you run into the trap of chasing the chords, as I think you understand. But when you understand the purpose, or function, of each chord in a sequence you can understand how the group of chords support a melodic line, how they move in circles to walk you away from I to IV or vii, and back to I again. The I IV V and the ii V7 I are both embedded in a larger progression called the circle progression,
I -> IV -> viii -> iii -> vi -> ii -> V -> I
I find that it helps to play through the major scale at different speeds, with different phrasing, and using a variety of sequencing patterns over the circle. Then you develop a ear for where the different voices are going.
As for which notes can be played over a sequence of chords... You may not like this answer but... All Of Them! The entire chromatic scale CAN be played over any chord or sequence of chords. The trick of it is in the approach. Typically (but not always as there are exceptions for every rule) one develops melodic lines that land on chord tones on string beats (one rule of thumb). That doesn't mean that you need only use scale tones or chord tones in the approach. Classic counter example to that way of thinking is the blues scale, or one of its various extensions. It is very common for players to force the minor blues over a dom7 chord with the same root. They add to this the M3 of the 7th chord leading to the following scale (1, b3, 3, 4, #4, 5, b7, 8). Note the long chromatic line that fills the space from b3 to 5. What really forks for me is what I call a leading tone principle. I allow myself any freedom to choose notes but aim for a chord tone on a strong beat and chromatically move up or down to that note. This is just one of many sources of inspiration. What really works is going back and fourth from one approach to another to make things interesting. Perhaps start on simple arpeggios and add texture as you go with chromatics.
Regardless or your approach the idea of playing arpeggios and modes over a progression is a good idea to get your ear acclimated to the movement of the notes and what works. This exercise helps with voice leading. I wouldn't recommend only playing arpeggios over the respective chords but I would recommend having them in your ear as focus points. This is, imo, the virtue of Abersold's approach that is sometimes missed. One is not suggesting that you only stick to diatonics, but you certainly need to know where they are in your head or the solo could meander off course and not come back.
As for the notes in the arpeggio of the chord it helps to learn poly chord theory and chord extensions. Complex chords like 9ths, 13ths etc can be broken down into simpler arpeggios (triads) that overlap. A classic example is the Maj7 chord which can be thought of two triads (1, 3, 5) + (3, 5, 7) The second group (3, 5, 7) is really just a minor triad played on iii. In some schools of thought this makes the iii chord a viable substitute for the I. If you add the 9th you get Maj7(add 9) or whatever the correct name is, and you can think of it as the -7 of the iii chord, or the 5th of the V maj triad. This way of thinking allows you to extend chords beyond their form. You can play the major scale in thirds, (1, 3, 5, 7, 9, 11, 13) and that exhausts all possible diatonic extensions, creating a Maj7(13) chord. This can be done with any mode to generate a full 13th chord at any position in the key. So in fact the whole major scale really "fits" over every chord in key. One possible exception is the 4th which is considered an avoid note. But in fact it isn't really forbidden to play it over a chord. It would sound odd if it were a focus point, i.e. played on a strong beat or the end of a melodic phrase. But passing through the 4 to get to the 3 would sound great as that would create resolution.
Blindly following (scale, chord) equivalence can lead to some unnecessary excursions away from home. Take for example minor ii-V's. Using the melodic or harmonic minor scales for minor keys we get ii-7(b5)-->V7-->i (where i is really vii, e.g. A- in the key of C). Rather than play Locrian over the ii-7(b5), Mixolydian over V7 and minor over i (or Dorian if you aren't paying attention), you can just build melodic ideas from the harmonic minor scale played on the i. It's easier to think about, hear, and makes for more "traditional" melodic lines.
A lot of the chords in a lead sheet are filler, they are part of a cycle extension that treats a relevant chord as a temporary I and uses part of the circle progression to fill in space. If you are looking to make a progression more interesting, learn the circle in maj and min keys and just grab a chunk. Once you understand how the circle works you can solo over the chords in sequence even of they are present and it will sound good, like you are adding texture to the song. If you are confused about a complex progression a good exercise is to try and figure out the real keys and modulations then remove all the cycle extensions. This reveals the bare bones harmony of the song. Staying with the reduced progression and letting the rhythm section back you up with extra chords will sound better than chasing chords.
As for a soloing approach I would recommend two exercises.
Transcribe or read transcriptions of famous solos for songs and artists you like. Ask yourself along they way what they are actually doing. I found this very helpful with Charlie Parker solos, Wes Montgomery, Mile, etc. You will learn more from this than trying to follow a set of rules that quite frankly are not enforceable.
Follow the Jerry Coker approach and write your own licks or phrases that sound "cool" to you and learn how to fit them into progressions. You will learn from this approach and it's more creative, you will sound like you more than like someone else or like a computer generated scale machine.
To answer your question about Dmin chord in C major more directly, it depends. Dmin in the key of C is on the ii and the mode that fits over that is D dorian, which is just C major starting on the 2nd note. However that doesn't mean it will sound bad if you play D minor (key of F maj) over it. It will force a modulation of the song out of the key of C and into F. The deciding factor would be whether you really hear a key change, or one is indicated in the song, perhaps by the presence of an A7 chord before it. Even if you force the modulation you would want to gracefully modulate back when the chords move back into the original key.