  The problem of directivity enhancement, leading to the increase in the
directivity gain over a certain desired angle of arrival/departure (AoA/AoD),
is considered in this work. A new formulation of the volumetric array
directivity problem is proposed using the rectangular coordinates to describe
each antenna element and the desired azimuth and elevation angles with a
general element pattern. Such a directivity problem is formulated to find the
optimal minimum distance between the antenna elements $d_\text{min}$ aiming to
achieve as high directivity gains as possible. {An expedited implementation
method is developed to place the antenna elements in a distinctive plane
dependent on ($\theta_0$; $\phi_0$). A novel concept on optimizing directivity
for the uniform planar array (OUPA) is introduced to find a quasi-optimal
solution for the non-convex optimization problem with low complexity. This
solution is reached by deploying the proposed successive evaluation and
validation (SEV) method. {Moreover, the genetic} algorithm (GA) method was
deployed to find the directivity optimization solution expeditiously. For a
small number of antenna elements {, typically $N\in [4,\dots, 9]$,} the
achievable directivity by GA optimization demonstrates gains of $\sim 3$ dBi
compared with the traditional beamforming technique, using steering vector for
uniform linear arrays (ULA) and uniform circular arrays (UCA), while gains of
$\sim1.5$ dBi are attained when compared with an improved UCA directivity
method. For a larger number of antenna elements {, two improved GA procedures,
namely GA-{\it marginal} and GA-{\it stall}, were} proposed and compared with
the OUPA method. OUPA also indicates promising directivity gains surpassing
$30$ dBi for massive MIMO scenarios.
