The example of a pen is not a metaphor. It is another example of the underlying linguistic phenomenon (pragmatics) in action. Just like the meaning of “Do you have a pen?” cannot be deduced from its structure, the meaning of “How are you doing today?” cannot be deduced from its structure. You are required to use context in both cases, and for the same reason. I am not sure why you are calling it a metaphor, since I literally described it as "another example of pragmatics". It is not a similar phenomenon, it is literally the same phenomenon in action.
If you wish to learn more about pragmatics, there are many resources on the subject. https://en.wikipedia.org/wiki/Pragmatics
If you interpret small talk as "feigned interest", then you are in error.