I am reasonably certain that the writers of Star Trek: The Next Generation did not have autism in mind when they wrote the episode Darmok about an alien race, the Tamarians, who speak entirely in metaphor. Despite the Federation's universal translators, they have been unable to communicate with this species.
But I think they ended up nailing it. In the opening sequence, Captain Picard is trying to speak with the Tamarian captain only to grow increasingly frustrated by the (to him) nonsensical response.
This is how my children (and to an extent, my husband) go through life.
Because people with autism can miss out on much of the non-verbal and social cueing in conversation, the spoken words can be confusing and difficult to follow. The more severe the autism, the more context is likely to be absent. The parallel between autistic loss-of-context and trying to follow a conversation which relies on stories you've never heard is a good one.
The Tamarian tells Picard: Darmok and Jalad at Tanagra (Let's cooperate.)
Picard has no idea. He thinks the Tamarian is offering him a weapon to initiate a duel and responds accordingly, slapping the knife away and refusing to take it.
The Tamarian must be getting insulted, wondering "Why won't this guy cooperate with me? He thinks he can fight the monsters on this planet all by himself? Why won't he just understand and give it a try?"
Aside from the fighting monsters part, I'm sure that Alex inspires these thoughts many times through the day and not just from me.
Meanwhile, Picard is getting equally frustrated, just as Alex does when I'm asking him to do something which he doesn't understand.
At one point, the Tamarians are referred to as having a unique brain structure which thinks exclusively in images. Ever since I've read how Temple Grandin explains that she thinks in pictures instead of words, I've tried to take that into account with my kids.
In the end, Picard and the Tamarians are able to begin communicating. Interestingly enough, Picard is the one who immerses himself in the Tamarian method. The Tamarian does not attempt to learn to speak in Picard's way. This completes the metaphor with the Federation being the ones who have "autism" and who must learn to adapt to a method of communication which makes no intuitive sense to them and relies on context they don't possess.
Although, we never do see the Tamarians again ... so the Federation must have been happy to stay in their own literal word-oriented world.