Hmmm. All music is patterns. There's just the patterns you know - and the ones you don't know. Yet.
And lots of songs don't strictly follow diatonic harmony.
Follow the chord qualities as a guide. Since each chord can imply many different scales - the key is to listen - and make choices based on what sounds best to you. If there's a melody over the chords - pick it out and learn it on the bass. It will help you with your bass line construction.
In regards to learning the fretboard. It's simply a matter of doing the work.
But here is the tedious key to the knowledge you crave.
Everything you learn to play - learn EVERY way and place it can be played on the bass. Any idea - run it in every possible configuration you can on the bass.
Focus on that - and you'll start seeing all kinds of very helpful patterns emerging on your fingerboard. You soon realize the "patterned nature" of music is extremely beneficial.