Rhayes,
The function you need to use is Boolean Array to number. You can make your mask using an array of booleans and then convert that to a number. The number will then act as your mask.
In addition you can use the boolean functions (And, Or, Not, etc) on the array of booleans and it will bit wise do the boolean operation.
You can look at some of the digital DAQ examples (Dig Multi-line Direction (E).vi) to see how this can be done.
Evan