My father and grandfather, and my father in law and his father were "probably" autistic, given that today we know more about the condition, but they weren't formally diagnosed. All the traits were there. But me and DH always just thought they were "different" compared to parents of our school mates etc., which was how they were perceived at the time. None of them were bad enough not to live a pretty normal family life, long term jobs, etc., but none of them really thrived in their jobs despite all of them being very intelligent/smart etc.
To a lesser extent if we think about it, both DH and myself are probably a bit that way too given our behaviour, likes/dislikes, etc., but again, not really interested in getting diagnosed etc., as we've lived our lives as best we could.
Thankfully DS isn't! He had tendencies during his childhood and teen years, i.e. no friends, obsessive behaviour/habits, eating disorders, etc etc., but since he went to Uni and then moved to a new city for his graduate job/profession, he's really changed.
I think a lot of it is learned/observed behaviour rather than genetic via DNA etc., at least for the more minor/moderate end of the spectrum. To an extent, I copied my fathers' and grandfathers' behaviour, noticed they didn't have friends nor a social life, etc., so it was kind of "baked in" to me through childhood. But I'm first to accept that I'm talking about the minor/moderate end of the spectrum and not the severe cases of autism.