Perl, 194
A perfect task for a language created by Larry Wall.
#!perl -na $x=2/($y=pop@F)*map{1..$_}@F;$_=((1x$x--)." ")x$y;sub f{my$l=$_;/1/ or$s=print;$s|/\]\[.{$x}\]\[/s&&next;for$d(@_){$Z=_ x(($z=$d*2)-2);$f=0;s/\d{$z}/[$Z]/&&f(grep{$_ ne$d||$f++}@_);$_=$l;}}f@F Brute force, but quite fast on the test cases (<1s). Usage:
$ perl ~/wall.pl <<<"1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 5" [][__][__] [__][__][] [][__][__] [__][__][] [][__][__]