2D dynamic boolean array

can I use it to solved my problem?

If the array is static (a fixed size), yes.