If I understand, you wish to generate all 2^16 forms of a 4x4 boolean array. I'm not sure why you wish to do so, but you can use recursion. In pseudo-code:

1) create an empty value (eg array)
2)...