It could be a case of mistaken identity. Sam might look similar to someone else who is involved in some sort of illegal or dangerous activity. The real target's enemies could have thought Sam was him and shot him instead. In a fanfiction world, this could lead to all sorts of twists and turns as the characters try to figure out who the real target was and why they were being targeted.
One possible plot development could be that his friends and family rally around him. They might search desperately for the person who shot him. For example, if it was a case of mistaken identity, they could start to dig into Sam's recent activities to find any leads. Maybe they discover that Sam was unknowingly involved in something dangerous, like being in the wrong place at the wrong time during a criminal deal. This could lead to a whole new sub - plot where they try to figure out who the real target was.
A rival law enforcement agency member could be a suspect. Maybe they see Deeks as a threat to their own investigations or operations and decide to take him out. It could be a power play within the world of law enforcement.
It could be an old enemy from Beckett's past. Maybe someone they put in jail a long time ago, who has now been released and is seeking revenge.
It could be a random act of violence by a criminal who was in the wrong place at the wrong time. There are some bad elements in the area where Blaine was and they just targeted him without any specific reason other than opportunity.
Well, it could be a rival of Ciel's in business or in a social setting. Maybe someone who is jealous of his status or wealth and sees shooting him as a way to get ahead.
It could be an ex - boyfriend who was jealous and wanted revenge. Maybe he couldn't handle the break - up and decided to harm her in this extreme way.
Perhaps Sam gets hurt while trying to protect a civilian in Flashpoint. The civilian feels guilty and tries to help in his recovery. This could lead to an interesting bond between them. Meanwhile, Sam's team is investigating who was behind the attack on the civilian that led to Sam's injury, and they uncover a conspiracy within the Flashpoint society.
Another solution could be a direct rescue. The heroes could use their powers or skills to overpower the kidnappers. Barry could speed in and disarm them before they even realize what's happening. Or perhaps Cisco could use his tech to create a distraction and free Sam.
The injury can also be a catalyst for Sam's growth. He could use the time of his recovery to reflect on his life and his actions. Maybe he realizes he's been too reckless in the past and decides to change his ways. This change in his character can be shown through his conversations with other characters during his recovery.
Well, it could be a story where Sam discovers she's pregnant unexpectedly. Jules is initially shocked but then becomes super excited. They might then go through the process of telling their friends and colleagues at work. Their friends could be really supportive, giving them advice on baby stuff. And as the pregnancy progresses, they could start decorating the nursery and having cute arguments about baby names.