We use a novel optimization procedure that includes the temporal and spatial parameters of the pulses acting on arrays of trapped neutral atoms to prepare entangling gates in N-qubit systems. The spatiotemporal control allows treating a denser array of atoms, where each pulse acts on a subset of the qubits, potentially allowing to speed up the gate operation by two orders of magnitude by boosting the dipole-blockade between the Rydberg states. Studying the rate of success of the algorithm under different constraints, we evaluate the impact of the proximity of the atoms and, indirectly, the role of the geometry of the arrays in three and four-qubit systems, as well as the minimal energy requirements and how this energy is used among the different qubits. Finally, we characterize and classify all optimal protocols according to the mechanism of the gate using a quantum pathway analysis.