First of a three-part series about editor scripting. Used to be one big tutorial in the Unity 3 era.
Custom Data, a Unity C# Editor Tutorial (catlikecoding.com)