I think your math may be incorrect.
Without any losses associated with conversion, a 4500 watt generator can only produce 112.5 amps. Inverters are no more than 90% efficient at best.
Watts = Volts x Amps - 4500w / 40v = 112.5a x 90% = 101.25a Max.
Additionally a 4500w generator has a noisy gas motor that would likely be too bulky to put anywhere on a cart. It might be OK for recharging batteries but that is about all.
As a rule of thumb, for generators requiring something like 4500w you would need a generator capable of nearly 10000w to run in a normal duty cycle of 50% which is recommended for an acceptable life cycle on the genset without prematurely killing it from running at maximum rating.