Here's some code I wrote quickly to get you started.
(defstruct box top left owner)
(defun make-random-boxes (rows cols)
(let ((b (make-array (list rows cols))))
(dotimes (i rows)
(dotimes (j cols)
(setf (aref b i j)
(make-box
:top (> (random 100) 50)
:left (> (random 100) 50)
:owner (and (> (random 100) 50) "A")))))
b))
(defun print-boxes (boxes)
"Print the boxes array to *standard-output*"
(let ((rows (array-dimension boxes 0))
(cols (array-dimension boxes 1)))
(dotimes (r rows)
;; print tops then sides
(dotimes (c cols)
(with-slots (top) (aref boxes r c)
(princ "+")
(if (< (1+ c) cols)
(princ (if top
"-"
" "))
(princ #\Newline))))
(when (< (1+ r) rows)
(dotimes (c cols)
(with-slots (left owner) (aref boxes r c)
(princ (if left "|" " "))
(if (< (1+ c) cols)
(princ (or owner " "))
(princ #\Newline))))))))
Here's sample output. I inserted two "."s because the forum wasn't showing a single leading space properly.
(print-boxes (make-random-boxes 4 4))
+-+ + +
.A A A
+ + +-+
|A|A|
+-+-+-+
.A|A|A
+ + +-+