Zoning laws or local regulations (not just HOA) most likely would prevent it. An example is in Seattle some of the most expensive neighborhoods have strict rules that prevent multi-tenancy housing and the people living there actively fight to preserve that.