  Finding ways of creating, measuring and manipulating Majorana bound states
(MBSs) in superconducting-semiconducting nanowires is a highly pursued goal in
condensed matter physics. It was recently proposed that a periodic covering of
the semiconducting nanowire with superconductor fingers would allow both gating
and tuning the system into a topological phase while leaving room for a local
detection of the MBS wavefunction. We perform a detailed, self-consistent
numerical study of a three-dimensional (3D) model for a finite-length nanowire
with a superconductor superlattice including the effect of the surrounding
electrostatic environment, and taking into account the surface charge created
at the semiconductor surface. We consider different experimental scenarios
where the superlattice is on top or at the bottom of the nanowire with respect
to a back gate. The analysis of the 3D electrostatic profile, the charge
density, the low energy spectrum and the formation of MBSs reveals a rich
phenomenology that depends on the nanowire parameters as well as on the
superlattice dimensions and the external back gate potential. The 3D
environment turns out to be essential to correctly capture and understand the
phase diagram of the system and the parameter regions where topological
superconductivity is established.
