 He basically went up to New Yorkers on city streets several years ago and gave them a microphone and just asked them to verbalize the stream of thoughts that were flowing through their mind at any given moment in time. And what you see in those externalized inner monologues is something very similar to what you hear Elaine going through in that clip.