I am assuming that myIndex is coming from something else and not manually entered .
Therefore the normal way of calling the function:
hypeDocument.functions().funName(hypeDocument, element, event);
will not work for you because it is dependant on the myIndex int from else where as to which function needs to be called.
But why can you not use:
Instead comparing to a list of function names in myFunctions.