You can catch the shrimp with a net and drop them into a bucket while you clean it out. You can skip a day or so of feeding so they are hungry then drop in a sinking pellet in each side of the tank, maybe one in the middle.
While the shrimp go and eat you scoop them up. You separate the pellets so you can scoop them up from 2-3 spots.
But Why do you need to take them out? You can scrape the algae on the glass with a razor blade. You can vacuum the substrate, use a white bucket in case you suck some up.
If you are trying to get rid of the algae, there are a few things you might try.
How long do you leave your light on. Is it stronger than normal? how many watts? Is it an old light bulb?
If you leave it on for more than 8 hours at a time maybe you can try a timer so it can be off for 2 hours during the day.
Do you have sunlight hitting it? A light right next to it that stays on all the time?
Over feeding. Type of food you feed? They require very little quantity of food.
Do you wash your filter with tap water?
If you do a big whole tank clean out you will be eliminating much of the bio film in the tank that the shrimp feed off of. Shrimp like established tanks.