I got really proficient at it when I started playing along to the radio. They mix up the music so you'll get put on the spot to instantly hear/recognise/play the correct notes.
It becomes an instant recognition-thing in short time, and I can see and feel where the music goes next.
There's only just so many boxes for the western ear, and you'll find you'll mentally form those geometric shapes when you hear the minor, 7th, etc., that soon you can hear the first note and call out the key.
Arpeggios and runs will come naturally after a while and you'll be running up/down the neck finding all the different places that same signature is playable.
Time is the greatest teacher, and playing 'name that tune'withthe radio seems to force me to just get better constantly.
A bonus: all those extra octaves and runs can fill in a small group nicely - a trill here - a run there - octaves for a gender change to acommodate a duet, etc.
Keep hammering at it - you'll get there.