You can set subject hierarchy attributes using shNode.SetItemAttribute
method as shown in this post: Hausdorff distance calculation in SegmentComparison module
If this scripting interface is not convenient enough then you can add items add an item to the right-click menu that shows a popup where you can add/edit/delete item attributes. You can add menu items using Subject Hierarchy plugin, using either Python or C++. See this example that adds a “Calculate statistics…” menu item. If we find that this need comes up often then we can add the plugin in Slicer core or maybe add an attribute editor similar to the node attribute editor in the Data module.