For now, I'm not super serious about actually writing/recording music, so my question is more focused on general techniques for ending parts of a piece while doing improvisation/noodling around on the piano (not during any sort of performance, though, just for myself).
I'm familiar with some chord progressions I can use to end a piece like IV-I, iv-I, II-I, etc. But I get tired very quickly of just playing these chords/arpeggios to resolve a part of the piece since it's too... harmonious. I find a bit of dissonance interesting, especially since I'm only using a piano so I don't have access to other tools like a large variety of instruments.
What are some general tips/tricks for ending parts of a song, or for creating a sense of resolution, while still maintaining some dissonance (preferably something beyond just adding 7th notes)? In particular, how might I utilize melody to do this?
I know one way without using melody might be to use dissonant chord progressions. For example, I recently discovered I kind of like the change from F# major to C minor, while playing in C dorian. But I have a hard time constructing a melody which smoothly transitions between these two, so often traveling to and from F# major feels forced, like the ending i chord only resolves what I'm playing because that's what the rest of the piece has been indicating is "home".
And, while it's not uncommon to see a modulation up a semitone or something happen with little to no transition just by repeating a chorus, I'm interested in how I might actually tie together two chords which are "far away", especially when I don't have a chorus or pattern of notes to refer back to, or without just repeatedly going between the two chords to "normalize" (for lack of a better term) the transition.
In summary: What are some ways to construct a melody to (1) enhance what, by themselves, might be boring chord progressions like iv-I or V-I with some dissonance and (2) smoothly transition between distant keys?