How to evaluate dynamical conditioning/pseudo code
First, your terminology is unusual. I wouldn't speak about "evaluating an array on an expression", but rather about "evaluating an expression using a variable assignment". Your array is, essentially, a variable assignment stating which boolean variables are true and which are false.

You can represent the expression as a syntax tree, having AND/OR internal nodes, and variable names MATH101 as leaves.

Then, you can evaluate the expression simply visiting the tree. In pseudocode:

boolean function eval(tree, array):

    if tree is a leaf X:
       return the boolean answering (X in array?)
    else if tree is OR(t1,t2):
       b1 = eval(t1, array)     # recursive calls
       b2 = eval(t2, array)
       return (b1 || b2)
    else tree must be AND(t1,t2):
       b1 = eval(t1, array)     # recursive calls
       b2 = eval(t2, array)
       return (b1 &amp;&amp; b2)


If you want, you can even implement short-circuit evaluation to save some time. If your expressions are short it won't make any difference w.r.t. performance, though.