For[i=1,i≤3,i++,
For[j=1,j≤4,j++,
ran=Random[Integer,{0,1}];
M[i,j]={{i,j},ran};
(*Print[M[i,j]]*)
];(* end for i*)
];(* end for i*)