I picked an ultimate trainer.

Simply view their team.

Open type chart, use links from bottom for multiple types. ( https://www.delugerpg.com/pages/type-chart )

Check weakness for each pokemon;
Exeggutor

Groudon

Salamence

Metagross

Lunala

if they have a Negative, use inverse chart; ( use links from bottom if it has multiple types. )

Mega Mewtwo Y

Then note down their weaknesses for each pokemon.
- 4x Ice 2x Poison 2x Flying 2x Bug 2x Dragon 2x Fairy
4x Water 2x Ground
4x Ice 2x Rock 2x Dragon 2x Fairy
2x Fire 2x Ground 2x Ghost 2x Dark
4x Ghost 4x Dark
2x Fighting 2x Psychic
- 4x Ice 2x Dragon 2x Fairy
2x Ground
4x Ice 2x Dragon 2x Fairy
2x Ground 2x Ghost 2x Dark
4x Ghost 4x Dark
2x Fighting 2x Psychic
- 4x Ice
2x Ground
4x Ice
2x Ground 2x Ghost 2x Dark
4x Ghost 4x Dark
2x Fighting 2x Psychic
- Ice Ground Ghost Fighting
Ice Ground Ghost Psychic
Ice Ground Dark Fighting
Ice Ground Dark Psychic
Open attackdex , filter by types ; sort by power. ( https://www.delugerpg.com/attackdex )

Check each type's best attacks , ignore z-moves if you need to use an attack more than once.

You can use either Dark or Ghost; unless your pokemon is a Dark or Ghost type as well, then always pick same type attack as your pokemon. in such case, s.t.a.b. ( same type attack bonus ) will apply and you will make more damage.
Additionaly, in this example Psychic has better power than Fighting, you can use Psychic; unless your pokemon is a Fighting type as well, in such case, s.t.a.b. ( same type attack bonus ) will apply and you will make more damage.
And finally;
My moveset for my Magikarp will be:
Freeze Shock, Precipice Blades, Shadow Force (or Hyperspace Fury), Prismatic Laser