Aside from legendary pokemon the following pokemon have the best Base stats
Dragonite, Snorlax, Arcanine, Exeggutor, Lapras, Vaporeon.
Other pokmeon can still be better than these if they’re individually more powerful. Breeding isn’t really a thing so no way of getting perfect modifiers aside from luck.
These pokemon will have the highest potential CP numbers. In the main series games pokemon had stats individually for HP, Attack, Special Attack, Defense, Special Defense, and Speed. These were all modifiers to how they perform in combat and each pokemon is unique, the same is true in pokemon Go but instead it’s all condensed into that single CP stat. Different pokmeon of the same species can have different maximum CP but the max is always raised along with your trainer level.
The move sets also matter though, a pokemon with lower CP can be more useful if it has a good moveset, but the ideal is one with both a high CP and good moveset.
Also hunches about that the XL pokemon tend to have more health while the XS dodge better in combat.