In the past, it was a common pattern to set custom member variables to objects you wanted to associate extension data with. The Parser object is/was used esspecially often.
However, this is bad style and is complained about by Phan. For the Parser use case, we introduced ParserOutput->setExtensionData(). Why don't we introduce the same thing for PPFrame? PPFrame is an object essentially resembling a transcluded template while parsing (although this doesn't seem to be documented anywhere, yay). It holds data about template arguments etc. Adding a store for extension data here as well would allow extensions to store template scoped information analogous to arguments, but it would be possible to write to them as well. Otherwise, they have to fallback to unsafe approaches as outlined before.
A case where this is useful would be, for example: