How do i spawn entity player with a gun

im new to all console commands and need help figuring things out my current desire is to spawn an entity player holding a gun or be able to switch bodies with an entity player i have spawned. are either of these possible preferable the second as it would make things easier? and is there a website where the console commands can more easily be searched for?

inventory.copyto Copies the players inventory to the player in front of them
inventory.deployloadout Deploys the given loadout to a target player. eg. inventory.deployLoadout testloadout jim
inventory.deployloadoutinrange Deploys a loadout to players in a radius eg. inventory.deployLoadoutInRange testloadout 30

Those commands should be what you're looking for.

If you're new to console commands, I hughly suggest using this as a reference.