Even though music expresses all sorts of emotion, it has a logic it is mathematical. The distance in time between notes or beats create the rhythm. The position of a fretted note or chord on the guitar creates its tone moving a particular note or chord up or down the neck alters the tone in incremental steps.
A lot of chord shapes can be applied up and down the neck. They may or may not sound good dependent on the relationship the root note and any open strings at any given position and or even in the case of a piece of music the relationship to the key.
To start playing lead guitar over a lot of standard E chord progressions the Pentatonic scale is worth mastering. Utilize all five box positions in both major and minor keys. Pentatonic scale