Why did Deadshot have to die?
There is an out of universe answer for it, and DC Extended Universe has to be blamed. Because of the movieverse, the TV shows are not allowed to keep certain characters anymore, more elaboration will be spoilry as you are still on season 3.
Here are some articles regarding it:
'Arrow' Actress Confirms DC Killed Their Harley Quinn/Suicide Squad Storylines
'Arrow'/'The Flash' characters killed by movie universe (contain spoilers for future seasons).
For Ray Palmer's story, you have to wait and watch. As his fate will be clear in later episode and shows. If you still curious then you can check Wikipedia page for Arrowverse which is spoiler filled.
If you wanted to know about Roy Harper, then it's due to the character's own health issues and anxiety.
In January, a fan made a comment about Haynes’ “secret gay past” on a Tumblr post, to which the actor replied, “Was it a secret?” Celebrity bloggers took the post as a confirmation that he was coming out, but Haynes didn’t make any further comment on the matter. Shortly after the post, he checked into rehab to deal with anxiety issues that he says led to ulcers. Haynes says his health issues were the main reason behind his decision to leave his role as the superhero Arsenal on “Arrow” last year.
Haynes says he is now feeling better and entering a new chapter in his life. “It took me so long to get to this point, but I’m doing so good,” he said. “I’m happier than I’ve ever been, and healthier than I’ve ever been, and that’s what I care about.”
He is also thinking of ways to start a new phase in his career. One of those ideas is a possible return to “Arrow.”
“I would love to do more. They know I love them. I’d go back in a second,” Haynes said.