Given your matrix, matrix←4 4 ⍴ 1 0 1 0
Each RGB pixel is encoded as a single integer in base 256: cb ← matrix × 256 ⊥ 255 255 255
Now we create the bitmap: 'bm' ⎕WC 'Bitmap' ('CBits' cb)
And create the content of the corresponding PNG: png ← bm.MakePNG
Let's create a native (i.e. non-APL) container file and catch its tie number: tn ← '\tmp\pic.png' ⎕NCREATE ¯1
Appending the data: png ⎕NAPPEND tn
Untying the file: ⎕NUNTIE tn
Here's all the code together as a program that takes the filename as left argument and the mask as right argument:
∇ filename PNG matrix ; cb ; bm ; png ; tn
cb ← matrix × 256 ⊥ 255 255 255
'bm' ⎕WC 'Bitmap' ('CBits'cb)
png ← bm.MakePNG
tn ← filename ⎕NCREATE ¯1
png ⎕NAPPEND tn
⎕NUNTIE tn
∇
However, you may want to scale the image a bit to actually be able to see it, so let's define a helper function that does the scaling:
Scale ← { ⍺ / ⍺ ⌿ ⍵ }
Now let's try it:
'\tmp\bigpic.png' PNG 100 Scale 3 3 ⍴ 1 0 1 1 1 0 0 0 0
]Open \tmp\bigpic.png

Here is a program that instead displays the picture in a separate window:
∇ Show matrix ; cb ; bm
cb ← matrix × 256 ⊥ 255 255 255
'bm' ⎕WC 'Bitmap' ('CBits'cb)
'f' ⎕WC 'Form' ('Coord' 'ScaledPixel') ('Size' (⍴ matrix))
'f.img' ⎕WC 'Image' ('Points' 0 0) ('Picture' bm)
∇
So we can do:
Show 100 Scale 3 3 ⍴ 1 0 1 1 1 0 0 0 0

The full documentation for the Bitmap object is available online by entering ]Help Bitmap
or offline by typing Bitmap
and pressing the F1 key.