I identify with your school experiences, although maybe not in as extreme a way; I could generally muddle through rote memorization to a certain degree, but my retention was terrible. The understanding was left behind when the specifics faded away...
Anyhow, for me, the "picture" exists, but it's more tactile than visual. There are visual aspects, but it's not how I process most of the information. Loops are spinning wheels when they don't have a clear exit condition, and feel like unrolled spirals when they're "for" loops going over specific ranges. Algorithms seem like they have a size/weight, which corresponds to my idea of how quickly they'll run on a given set of data (although it's not always accurate, yet).
If I don't remember how a section of code works internally, it feels hollow, and when I read the code, it's like looking inside the black-box. If I change something outside the box, I feel the domino effect, and when it hits the box, I need to look inside to see what'll fall over. I can also feel like threading some string through the eye of a needle, when I'm running some value up through a class hierarchy, or something.
I think that the important insight is that a lot of us become very skilled at constructing mental models of what we're working with, and gain some sort of sensory perception (often vision-related) of how the model functions. I think it's telling that (in my case) the world falls away from my perception when I'm working through a complex problem, and closing my eyes sometimes helps, as well.