In this paper, we consider the 3D beamforming with Multi-Active Multi-Passive (MAMP) antenna arrays. For the optimization of the hybrid array's active elements' (AEs) weights and passive elements' (PEs) loads, we propose a novel algorithm, i.e., the alternating optimization-stochastic 3D beamforming algorithm (AO-S3DBA). The scheme is built on a generalized cost function and alternates between the optimization of the loads and weights. Despite the dramatic increase in data points, we managed to decrease the algorithm's complexity by employing Adam, a popular accelerator for stochastic optimization, for the update of the optimization variables. We present simulation results, where the proposed MAMP array can successfully emulate the beam of a uniform rectangular array (URA) with the use of 50% less AEs and with beam steering capabilities towards various azimuth and elevation directions. We believe that this newly proposed type of hybrid transceiver offers a good trade-off between cost and performance, which can be particularly useful in many industrial and Internet-of-Things (IoT) applications, where the deployment of a large number of transceivers / sensors directly affects the application's total cost.