As aiwass was saying, use your ears. Take a simple jam pattern, perhaps moderately paced arpeggios with Fm, Bbm, Cm, Fm. Play this into a recorder for a few minutes, or program it into GuitarPro or a similar program and set to loop infinitely.
Now, pick a position, say 8th position (i.e.-play with notes using your index finger on the 8th fret, your middle finger on the 9th fret, ring on 10, and pinky on 11)
Start this recording, and keeping your fingers in this position, just play notes. DO NOT think about any patterns, just listen to how the note you hit interacts with the chord. Record yourself doing this. After a while you'll start developing licks.
After this, listen to the recording. If you find a cool lick, do some analyzation on it. Perhaps you did this... (copy and paste into Notepad to see tab)
Fm Bbm
|----------------|---------------|
|----------------|---------------|
|----------------|---------------|
|-----10h11p10/8-|-10~----8~-----|
|-8~-------------|---------------|
|----------------|---------------|
Well, at the time you weren't think about what you were playing, but now pick this lick apart. Notice that you ARE playing in a pattern, a 5th string root Aeolian pattern, but not because you were thinking about it, but rather instinctively. Your ear led you to do so. Notice that you started on the root of the F Minor and then made a jump of a perfect fifth with a little hammer on, pull off, slide from C to Db back to C and down to Bb which is the 5th, 6th, 5th, and 4th in respect to the F Minor chord. On the second chord, Bb Minor, you play a C, Bb Minor's ninth, then resolved it to the root.
Important notes on lick - leap of a 5th, resolution from 9th to root.
So playing with just your ear, you can come up with licks that you normally wouldn't think of. I mean, how often do you sit down and think... "ok, I'm playing lead over an F Minor chord, so I'm going to start on the root, go up a 5th, hammer on to the 6th, pull off back to the 5th, go down to the fourth in anticipation of the next chord, but play the 9th when the chord is actually struck for added tension, but I'll resolve it to the root." Playing with your ear rather than thinking about what you're playing is "playing from the heart", which is the cute little phrase for playing using the subconscious rather than the conscious.
"You must stab him in the heart with the Bone Saber of Zumacalis... well, you could stab him in the head or the lungs, too... and the saber, it probably doesn't have to be bone, just anything sharp lying around the house... you could poke him with a pillow and kill him."
- Aqua Teen Hunger Force, The Universal Re-Monster