Those structures do exist, but they're not normally popular. Look for "power purchase agreement" solar plans. Normally those involve some pretty long contracts that are hard to get out of, contracts transfer to the new owner of the house so it can make your house less desirable, often require you to buy all the power they generate even if you don't need it all, need to call their contractors to remove the panels whenever you need roofing work done, you've got a lot of equipment in your house that isn't yours.
I wouldn't do it. I don't need yet another interested party when trying to sell my house eventually, and I don't want to scare off would-be buyers with potentially complicated contract terms.