An endless variety of melodic phrases can be derived from the permutation (changing the order) of chord tones. Basic seventh chords contain the root, third, fifth, and seventh scale degrees. If we were to mix up these chord tones with variations that start with the root note only, we would come up with the combinations ( 1357, 1375, 1537, 1573, 1735, 1753).
When starting from the third, the combinations would be (3157, 3175, 3517, 3571, 3715, 3751).
When starting from the fifth, the chord tone combinations would be (5137, 5173, 5317, 5371, 5713, 5731).
When starting from the seventh degree, the combinations would be (7135, 7153, 7315, 7351, 7513, 7531).
In order to learn this information all over the neck of your instrument, I recommend taking each variation through all seven modes (Ionian, Dorian, Phrygian, Lydian, Mixolydian, Aeolian, Locrian). It's best to start in root position with the standard 1357 chord tones on the Ionian mode or major scale.
Continue this sequence through the Dorian mode.
Are you beginning to see the amount of work ahead of you? Continue taking this concept through the Phrygian, Lydian, Mixolydian, Aeolian, and Locrian modes.
Now continue this exercise starting with chord tone variation 1375.
Does spending hours learning all of this information guarantee that you're going to take a good solo? The answer is "no". This information needs to be experimented with and applied. Below is an example of employing 1537 as a send-off and tagging the phrase with a melodic ending.
I have provided you with months of work and information to reflect on. Take one permutation through all seven modes and then experiment with melodies and phrases that can be created with them. These lessons need to be learned in all keys. Good luck!