I do not know if anyone has solved a similar problem - solution used in plugin Scripted Argonian Feet is too complex and, in particular - use the fixed list of objects. I'm looking for an simpler and versatile solution...
I agree my approach in Scripted Argonian Feet is rather complex, especially since it's fairly out-dated nowadays and far inferior to its improved version used in my http://www.tesnexus.com/downloads/file.php?id=30094... but coming to think of it, even this one's fairly out-dated already...
...but my approach is "not" using a fixed list of objects ever. That would be contradictory to its purpose, universal applicability.
I'm working on this approach since 2 years... well, "was", until my laptop died and all modding got suspended until further notice (that is when I finally get some time to buy a new pc)... and was constantly improving it... and will be as soon as I can go on modding again.
The basic approach is to not allow unfitting items to be worn and to replace them with their fitting counterparts, if present. The emphasize here is on "present", as my scripts "look out" in the folder (incl. BSA archives) of the original NIF files for so-called "adapted" files. I devised a system to mark these with certain "tags" according to the system they're used in, so my scripts will recognize them and associate them with the items automatically. Once an adapted file is found, it will be used (maybe one will have to trigger an update-process due to my approach also using "generic placeholders" for items without fitting counterparts for the time being), no need ever to alter any scripts.
A simple example of what it does:
Let's assume there's an armor item ingame with a NIF file in "meshes/armor/honorguard/cuirass.nif". Now my scripts are told to search for adapted upperbody files by the tag "dcpart", as done in my Anthro-Dragon race. As soon as this item gets equipped by an actor of the special race, the scripts search for "meshes/armor/honorguard/cuirass_dcpart.nif" and if found, replace the visuals (stats and such are preserved) of the item ingame with this mesh.
In case there is no "cuirass_dcpart.nif" and my scripts are configured not to allow unfitting upperbody items the visuals of the item will instead be replaced by a generic placeholder, also configured in the initialization part for the race in question. This "replacer template" is intended to become a rather complex system of anolysing armor-class (or clothing), value, weight, or whatever of the item equipped and take this into consideration for what replacer template's visuals to use for the time being, until a real adapted mesh gets added into your folders.
The only things "fix" in my approach are the files to be used when nothing is worn (1 for each body part, just like Vanilla, or more, that is, when using a race able to do partial shape shifting), and even those are configured in the initialization part for the race in question. The scripting approach used in my Anthro-Dragon race can control multiple different races at once, and one can use more than one mod using my scripting approach at the same time as well.
But it indeed is rather complex, and not at all free of bugs or flaws or even completely working as intended yet. I had to do an emergency release when my laptop was on the verge of dying or loose all my files forever. So they're by no means finished up as I'd like them to be yet.
I'm so thriving to go on with it and finally finish them up to a state I can be satisfied with... but that's not going to happen soon I'm afraid.
One major point I stumbled across and what your scripts are lacking though is using the function GetEquipmentSlotMask instead of GetEquippedObject.
With GetEquippedObject you'll have to make a direct match for slot-combination (and still not all arbitrary combinations are possible to cover). If you use it with the parameter for lowerbody and the item you're wearing also covers your feet, you will not receive a usable value. If you use GetEquipmentSlotMask with the mask for only lowerbody though, you will receive the base-id of any item you're wearing that is covering the legs, if it's occupying other slots as well or not.
Also keep in mind using the old functions EquipItem and UnequipItem UnequipItem will very well trigger the OnUnequip blocks, but EquipItem will "not" trigger the OnEquip blocks.
Your scripts for the Arena Raiments for example will lead you to loose the flag ICArenaMatchGateRef.WearingArmor when your scripts unequip unfitting Arena Armor, but you will "not" get it back when your scripts equip fitting Arena Armor afterwards.
I had to alter the Vanilla scripts for detecting Arena Armors myself so they set this flag different ways and not via OnEquip and OnUnequip.
Nowadays though one can easily use the new Equip/Unequip functions from one of the latest OBSE releases instead, with telling them to explicitly trigger those blocks.
Just something important to keep in mind, as I myself ran into a lot of trouble due to not knowing it at the start.
edit: You might want to take a look at those resources:
http://www.tesnexus.com/downloads/file.php?id=14326
http://www.tesnexus.com/downloads/file.php?id=33521
As far as I know they work by putting a script on all items one wants to be wearable and such, among other things,... so nothing I could use for my own purposes... but there might be something useful to your purpose. :shrug: