How do NPCs heal our Pokémon?

In various Pokémon games, there are scenarios where we come out of a big fight (usually a boss fight) and an NPC heals our Pokémon for us. I know that Pokémon are healed in Pokémon Centers using special machinery, but is there any in-universe explanation to how these NPC can heal them at a seconds notice without any help?

The player's Pokémon being healed by a nurse in FireRed/LeafGreen


This is never addressed in games. You can imagine it being a vast supply of Max Revives, Max Restores, and Max Ethers if you want.