Paul had the music of the song written before the lyrics (which was common place). He came up with the verse "Picks up the rice in a church where a wedding has been" and formed the idea that the song would be about lonely people. As for Eleanor,,this was just a name that Paul liked (he said probably because of Eleanor Bron who he knew at the time) and Rigby was a name of a shop that Paul walked past.
Most of us know that Father McCartney was the original thought up name for the priest because it just fit the syllables, but paul didnt want to use McCartney because of his dad. John and Paul went to the phone book and looked at the next name in line after Mccartney,,,,hence McKenzie.
Nothing more to add. Just about lonely people.