Here’s a short melody I worked out using minor 3rds descending by half steps. It works well as a V7 to i minor cadence and after the descending minor 3rd passage I added a short 5 note minor melody to help hear the resolution. Intervals descending or ascending by half steps have a lot of melodic integrity and structure, are easy to hear and so, are good for creating phrases that move outside normal harmonic constraints. Any sequential idea that moves in a predictable pattern will usually work well even if it leaves it’s original harmonic context behind. This melody is played around the circle of fourths starting with concert G7 to C minor. Notice the the melody starts by outlining the minor triad of the related ii chord of the V7 (i.e. D minor is outlined before the G7), this will help prepare your ear for the altered material over the dominant 7th and helps the melody to function more appropriately in a ii-V7-i context.