For trainers: Include this piece in the trainer's pokemon, within the same section as determining the pokemon's item or moveset:
Form = x
Replace x with the form's number, for example:
Pokemon = RAICHU,100
Moves = THUNDERBOLT,PSYCHIC
Item = LIFEORB
Form = 1
Gender = male
This would give the trainer a level 100 Alolan Raichu, which is set to male, holding a life orb, and knows only Thunderbolt and Psychic. Just to give a visual of how to put the form in