calling a random function number
What you want is an array of function pointers.

void anim1() {
    // blah blah
}

void anim2() { 
    // blah blah
}
// ... etc ...

typedef void (*animptr)();

animptr anims[10] = {
    anim1,
    anim2,
    anim3,
    // ... etc ...
    anim10
};


Then you can use:

anims[animNumber]();