That's no problem. The new Prius Prime has one of those. Problem is that you don't add much even if you take up much of the car; the 185 watt panel on the Prius adds about 6 miles of range a day. The Lightyear looks good but I'll believe those range numbers when I see them. Cars just don't have that much surface area. BTW Aptera tried to do something similar, but they are dead in the water now.
I also saw a GoFundMe for a "deployable" solar power system that would extend from a roof rack thing and cover the windshield and the back of the car. That, of course, only works when you are parked, and you may lose more range from the big roof rack thing than you get back from the solar charger.
That, unfortunately, doesn't work. The Laws of Thermodynamics say that you can't get more energy out of the wheel than you put into it, so at best you break even.