Independent viewport properties

I’m looking for a way to create a custom Property (RNA property), which has unique value per 3D view window. Basically I want to have different value for each viewport. It should be work like the “Grease Pencil” activation switch.

Unfortunately, I can only define custom properties for ID, Bone and PoseBone subclasses and these always refer to an object and not a window.

Is there any known workaround for this problem?

Edit:
The problem was solved by alias_ludi.
https://www.blendpolis.de/viewtopic.php?f=16&t=53898&p=541939#p541939