@Mikey_Seregon, I figured out what was causing your problem with generic enemy weapon ranks...when autoleveling an enemy, if the game determines that a unit can't wield a weapon that has no locks and is of a weapon type they have a nonzero weapon rank in, it will set their rank in that type to the weapon's rank.
The check for whether a weapon had no locks didn't account for my lock system, so, assuming that the unit just didn't have a sufficient weapon rank, it would overwrite the unit's weapon rank with the rank of the array-locked item...which could lower your weapon rank.
Anyway, to fix this make the following change:
-$17ABC: Replace 00 3C 3D 00 with 00 3C 3D FF
-$17FC0: Replace 00 3C 3D 00 with 00 3C 3D FF