3dresample and 3dfractionize have two approaches to doing this. The first interpolates the mask onto the output grid using different interpolation schemes. For masks, you will want to use the NN (nearest-neighbor) method. 3dfractionize allows a little more flexibility by allowing the resampling to include voxels that aren't partially filled or filled with different regions. One can pick the fraction to preserve the original value. See the help for each of these program or the afni11_roi.pdf class documentation for more details.
https://afni.nimh.nih.gov/pub/dist/edu/latest/afni_handouts/afni11_roi.pdf