For many years I played guitar mainly by ear. I knew most of the notes in first position and those up around the 12th fret. Everything in between was very “gray” in my mind. I would just force my fingers to learn the shapes of the sounds that I wanted to make. At times It was frustrating process. I wanted to know what I was doing but it seemed so difficult to figure out.
Then I learned about Single String Scales while studying with Doug Doppler years ago. Essentially you take any scale and play it up and down the fretboard, slowly, one string at a time. This made a huge difference for me in all aspects of playing guitar. Scales, chords, arpeggios, melodies, all were clearer and easier for me to grasp. It was still a slow process, but I could finally understand and see the notes on the fretboard in my mind.
I still do Single String Scales as part of my practice regimen using exercises from a great book that Matt Warnock put together called Fretboard Mastery. It goes into depth on demystifying the fretboard, with clear and easy examples.