How to shuffle/draw cards?

This will probably end up being extensive, as I do not even really know where to begin.
I need to make two decks of cards. One is for spawning zombies, one is for drawing equipment. The zombie card you will just click through, but I need it to shuffle the cards once a pass through has been made. The Equipment deck will be more complicated, as when you draw something it will need to be set aside as it will be in you “hand.” This will need to happen with an indeterminate amount of cards. Once the deck has been gone through, it will need to shuffle the cards that have NOT been set aside. Also, you will need to be able to put the cards BACK in the deck, as if they have been “discarded.”
I know it will probably need arrays and such, and I am quite a noob when it comes to that. Any help would be greatly appreciated!