Take the number mod 4 for the suit (giving a number from 0 to 3). Take the number divided by 4 for the value (giving a number from 0 to 12, which you can add 1 to in order to have a value from 1 to 13). Remember that integer division will return the "floor" of the mathematically exact answer.
For multiple decks, you'd first divide by 4, then take that mod 13 (then add 1 if you want).
A common shuffling algorithm (in C) :
void shuffle_deck(int *deck) {
for (int i = DECKSIZE - 1; i > 1 ; --i) {
int r = rand() % (i + 1);
int t = deck[r];
deck[r] = deck[i];
deck[i] = t;
}
}