I myself am waiting on the inventory walking functions to be added to NVSE which helps greatly with what you want to do. What I do is to use a persistent container in a holding cell and have the player activate it. Then you can place items into the container and walk its contents to get references to the base objects in it. Then it's just a matter of adding that item to the companion and equipping it using the no unequip flag (also be sure to remove the item from the container). That makes it so that the NPC can not remove the items you select. It needs another step to remove those items. This time I just walk the NPC's inventory and use if getequipped someitem > unequip someitem. That also clears the no unequip flag. You have to be careful not to ever use removeallitems on an actor that you have used the no unequip flag on as it will crash the game.
As far as making them unequip some weapon you can use NVSE getequippeditem (pretty sure that's it) and use the weapon slot, then call unequip TheItem 1 where the 1 makes it so that the actor can not reequip that item (unless you equip it later in a script). I imagine that's not a very good solution on its own though as the actor will just equip another weapon in their inventory.
Probably more complicated than you wanted (and of course can't be done until NVSE adds the functions) but I have used it in Oblivion and FO3 and it works great.