I don't know Matlab Code for this, anyway rememebre that ther are not "easy" foruma for large dolph-chebyschev array (for small linear array a closed form is avilable but it becomes quckly unstable !!!).
Concerning the 2D array the answer is yes ! it is possible using particular transformation obtain a pencil beam sorrounded by "quasi circular" side lobe topography by means of 2D rectangular lattice.