The Arrow's Invasion episode starts with the human heroes teleported to the Alien Mother Ship where they are unconscious and entombed in cocoons (well, technically the episode is told out-of-order, so you don't learn this until later, but you know what I mean).

Apparently, these cocoons induce a Matrix-like experience where the occupants all interact with each other in a fictitious but seemingly real version of their own world in which they experience life without many of the tragedies that they really experienced.

For example, Oliver Queen (Stephen Amell) is living in his parent's (who are both alive again) mansion and he is about to marry Laurel Lance aka Black Canary 2 (Katie Cassidy). While Oliver is walking and talking about life after marriage with his Father they are confronted by an armed mugger but saved by the Green Arrow (who turns out to be John Diggle in this alternative fantasy-scape).

Before they are saved, part of Oliver seems trapped in his fantasy life while the part of him used to being Green Arrow acts to stop the mugger. In his mind, he sees small bits and pieces of a life that he lived before entering the matrix.

He is supposed to go straight to his wedding rehearsal dinner but instead he ends up using those bits and pieces of his memories to fumble his way to Team Arrow headquarters where he runs into John Diggle (David Ramsay) and Felicity Smoak (Emily Bett Rickards) who are very surprised he knows the secret codes to get into their headquarters.

Later, Diggle chases Oliver down to tell him that his own memories are playing tricks on him and that he is not sure that what they are currently experiencing is real. They start to figure out, together, which of the people in this Matrix are REAL and which are representations of the optimal reality that the Matrix is generating for them.

It turns out the REAL people are Ray Palmer aka Atom (Brandon Routh kind of odd/ironic that he is in a DC crossover with Supergirl but as a different character), Olver Queen, John Diggle, Thea Queen, and Sara Lance aka OG Black Canary (Caity Lotz).

All of them are ready to work together to escape the simulacrum except for Thea, who is pulling a Cypher (Matrix reference) because she doesn't want to leave this world where their lives have not been so full of tragedy and where they have their parents back (although her real Father is Malcolm Merlin but whatever).