The intense search for topological superconductivity is inspired by the prospect that it hosts Majorana quasiparticles. We explore in this work the optimal design for producing topological superconductivity by combining a quantum Hall state with an ordinary superconductor. To this end, we consider a microscopic model for a topologically trivial two-dimensional p-wave superconductor exposed to a magnetic field, and find that the interplay of superconductivity and Landau level physics yields a rich phase diagram of states as a function of $mu/t$ and $Delta/t$, where $mu$, $t$ and $Delta$ are the chemical potential, hopping strength, and the amplitude of the superconducting gap. In addition to quantum Hall states and topologically trivial p-wave superconductor, the phase diagram also accommodates regions of topological superconductivity. Most importantly, we find that application of a non-uniform, periodic magnetic field produced by a square or a hexagonal lattice of $h/e$ fluxoids greatly facilitates regions of topological superconductivity in the limit of $Delta/trightarrow 0$. In contrast, a uniform magnetic field, a hexagonal Abrikosov lattice of $h/2e$ fluxoids, or a one dimensional lattice of stripes produces topological superconductivity only for sufficiently large $Delta/t$.