Plotting antenna pattern in MATLAB
Denote the array manifold (what you call array pattern) by a $N \times 1$ vector ${\bf{a}}\left ( \theta \right )$ where $\theta$ is the DOA and $N$ is the number of array elements. Further denote by the $N \times 1$ vector $\bf{x}_k$ the $k$-th snapshot of the array, then you are measuring the following signal:

\begin{equation}
{\bf{x}_k}= {\bf{a}}\left ( \theta \right ) s_k + {\bf{n}}_k
\end{equation}

where $s_k$ is the signal reflecting from the target and $n$ is a random noise.

Denote the beamformer by a $N \times 1 $ vector of weights ${\bf{w}}$, then the array response after beamforming would be 

\begin{equation}
r(\theta) = {\bf{w}}^H {\bf{x_k}},
\end{equation}

Note that $r$ is a scalar for a given DOA $\theta$ and $\bf{w}$ is a function of $\theta$. Now, to get the array response for a variety of DOAs just change $\theta$.