If you want to plug an EV in to charge, put a circuit in and have fun.
If you want to backfeed any power to the grid, well, you need an application with the power company (which usually has an application fee), plans that often have to be reviewed and approved (which is a giant pain in some areas, mine included), then the new rate schedules, inspections of the generating facilities for initial operation and continuing operation, and it's a giant pain in the rear. Plus, there's really no strong incentives to actually do this sort of thing, financially - if you've got a solar install, OK, but just a battery... eh. A backup generator is an awful lot cheaper in most cases.