I'm not quite sure what you're asking with the first question, but:
If you have two components on the same window they can absolutely refer to each other's properties (though at scale this can be an antipattern; it often makes sense to make additional custom properties on the root container and bind bidirectionally to that central property from both components as needed).
If you have two components on different windows, then you need to obtain a reference to the actual window object (e.g. system.gui.getWindow
), or use a different strategy to share the data (e.g. client tags) or one of a few other possible options, but the exact best approach will vary a bit.
For your second question, if I'm understanding correctly, take a look at this post/project; I think it covers what you're asking for: