This is very doable, and it gives you a power solution you can bring with you in the plane. Let's focus on the pre-heating part, since that's simpler and hopefully a more common use case than charging your plane's battery. Figure out how much power your heater pulls in watts. Using a kill-a-watt is a good way to measure. I think mine pulls about 800W total to heat the oil sump and each of the four cylinders. If yours only heats the sump, it probably uses a lot less power.
Want to pre-heat for an hour? In my case I'd be looking for a LiFePo4 battery that can output at least 800Wh (watt-hours; that's literally saying it can output 800W for an hour). A standard 100Ah (amp-hour) battery will give about 1300Wh, so that would be more than sufficient.
Then you need an inverter that can handle the load. Over-size it. For my 800W load, I'd look for something rated for 1000W or more.
Connect it all with appropriate gauge wire, and you're in business. A simple approach is to secure the battery, inverter and charger in a milk crate with straps and zip ties.
Or just buy one of the ready-made power stations with a sufficient power rating.
DIY example with respectable components:
$100 inverter
$260 battery (after coupon)
$50 charger
plus wire, connectors, and a crate or toolbox to put it all in. You get a fun project and save a lot compared to buying a Jackery 1000 or similar.
To charge the plane's battery, you'd want a DC-DC charge controller along with a way to connect it to the plane's battery. But hopefully that isn't a common need, and it may not be worth worrying about.