Term used for juxtaposing different meanings of the same word
This device, whereby a single word modifies more than one element, each with a different meaning, is called a semantic syllepsis, or zeugma.
However, there isn't an absolute consensus on the definitions, so I recommend consulting the wiki article on zeugma
A similar device, but where the same word is repeated throughout the sentence, is called an antanaclasis.