Technically you can't; how Piratez or XCF do this is placing invisible (just black) items in the respective slots.
Here's an example which "removes" backpack (because it's an astronaut suit with LSS):
armors:
- type: STR_FLYING_SPACE_SUIT_UC
builtInWeapons:
- INV_NULL_3X3_BACK_PACK
items:
- type: INV_NULL_3X3_BACK_PACK
categories: [STR_BLANKS]
weight: 0
bigSprite: 442
invWidth: 3
invHeight: 3
fixedWeapon: true
defaultInventorySlot: STR_BACK_PACK
recover: false
Bigob attached.
You can do the same thing with other slots, you just need differently shaped black items. If you have X-Com Files, you can look into /Resources/UI/Blanks/ for examples.