Define dynamically sized array and edit in the editor?

I can define and resize arrays just fine but what I’d like to do is define an array in script in one place and have that control the size of all my other arrays that are linked to that data but also allow me to edit those values in the editor for its children instead of just at runtime. Any ideas?

You can’t make it so that one array automatically controls the size of another, but you could define a custom data structure that contains all of the data that you were going to put in ALL of your different arrays, and then use a single array based on that data structure.

public class MyComponent: MonoBehaviour
{
    public List<MyData> allMyData;

    [System.Serializable]
    public struct MyData
    {
        public string name;
        public int id;
        public float powerLevel;
        public MonoBehaviour associatedScript;
    }
}

A custom inspector would be another approach.

Manual: Unity - Manual: Custom Editors
Tutorial: Property Drawers and Custom Inspectors - Unity Learn

These may be somewhat out of date, but I found them useful: