Avoiding code duplication with FindProperty

I’ve built a bunch of monobehaviours that I’m using purely to edit game data.

I’m trying to avoid duplicating field references, so I can add/change stuff later without it being a total nightmare.

My first question is, does anyone have a good approach to avoiding duplication when an inspector is using FindProperty( fieldname ) – at least something where changing the fieldname itself can be handled through automated refactoring (like resharper’s name change). Is there some unity magic or just general cleverness that can avoid the duplication?

My second question, is it possible to work with serialized properties such that they’re writing to a field not contained directly in the editor Target object? So for example:

class A : MonoBehaviour{
  public X MyX;
 
  [Serializable]
  class X{
    public int XsIntField;
  }
}

[CustomEditor(typeof(A)), CanEditMultipleObjects]
class AEditor : Editor{
 

    public override void OnInspectorGUI() {
        serializedObject.Update();
        // is there any way to do this?
        EditorGUILayout.PropertyField( serializedObject.FindProperty( "MyX.XsIntField" ) )
        serializedObject.Apply...
     }
}

So here FindProperty would get MyX, then get the XsIntField from MyX.

Or … is there some better way to approach this?

So this question was really poorly worded, which I think is the reason that it got no responses…

That said, the actual answer to my problem was ABSOLUTELY NOT writing tons of custom editors or property drawers or whatever. The answer was to buy the following: Unity Asset Store - The Best Assets for Game Making

Then just not have to deal with all this nonsense at all. Hell, I can even properly use interfaces again!! IN THE INSPECTOR!!