HEY, WHAT HAPPENED? Anytime I miss something that I am going for on a gig or session, it is caused by not having a physical move or specific note shapes memorized. When something is "Not" memorized, "I" have to think about what comes next. That is an undesired mindset because it clouds my mind.
That mindset is why Buddy practiced chimes 13 hours straight, as the famous story goes. He did not settle for "that's good enough". He practiced until he could not mess it up. Hesitation as to which strings to play, which pedals to engage, bar movement, etc., should never be part of the playing process when you are onstage.
My memory is complete once I can watch TV while I play. That's what I mean by getting everything to the point of "Muscle Memory". I no longer have to think about what I am doing as I play. ISOLATE REPEAT CONNECT
My advice: Practice any lick, phrase or move until it is memorized. If you are working on the Picked Rake, play rake after rake after rake across all 10 strings so that your mind gets comfortable with doing the physical move... no matter where you decide to apply it. (This is our version of batting practice, free throw practice, putting green, driving range, or shooting clay pigeons for target practice). Isolate the activity, develop it until it is second-nature and constantly maintain it. Break the movement down into small bits. For the Picked Rake example, being able to switch strings before adding notes is the first step. As you start to put licks together using the rake, slow everything down. Find the tempo where you can play both the lick and the rake perfectly every time. THE GAME SLOWS DOWN Athletes use that phrase to describe the point in their playing where they are no longer concentrating on how to be in the right place at the right time doing the right thing, only on being there. That's the manifestation of practiced Mental and Muscle Memory. When someone pursues learning something new by attempting it up to tempo, flaws (missed strings or blocks) creep into the memory process. By slowing it down to your "perfect tempo" (the tempo at which you can repeatedly play it perfectly), the mind will memorize "perfection" within repetition. You won't know how to play it incorrectly, because you have never done so. Then you can gradually speed it up.
ALL IN GOOD TIME You will be amazed at the difference in clarity this procedure brings into the right and left hands. Never set a timetable for when something gets memorized...it arrives when it arrives. For my journey, some things came easily, while others almost never came. After relentless practice (sometimes over months), one day I noticed they were there. My relentless practice process paid off.
GOOD HABITS It's important to analyze your own playing and recognize that if you find yourself "not knowing what to play", it's likely you have limited your physical capabilities by rushing through the playing mechanics of the instrument. Your mind won't allow you to think of musical things you can't physically pull off, or if it does, you cannot execute them cleanly. This often leads to never leaving your limited comfort zone, stale ideas, (reversion to playing the same old licks that you DO know over and over), plateaus and frustrations. All of us have our own physical issues to overcome, so never be hard on yourself because some things require more effort than others. I promise - with time - they will come.
Learning is really about developing correct practice habits. Never try to shortcut the process. I found when I tried shortcutting it, my time for really nailing something took longer because I would have to revert back to these immutable steps towards memorization.