Consider the following setting. I have a box $\Omega = [0,L]^{d} \subset \mathbb{R}^{d}$, for some $L> 0$. In physics, this is usually the case in statistical mechanics or some problems in quantum mechanics. The free Hamiltonian $H_{0}$ is just $H_{0} = -\Delta$. Suppose $\Omega$ is considered with periodic boundary conditions. In this case, plane waves $$f_{p}(x) = L^{-d/2}e^{i\langle p,x\rangle} \quad p\in \frac{2\pi}{L}\mathbb{Z}^{d}$$ are eigenstates of $H_{0}$.
I am a bit confused with the role of boundary conditions in this setting. The functions $f_{p}$ are periodic, so these are only eigenstates of $H_{0}$ because of the boundary conditions assumed. How these eigenfunctions change if we assume other boundary conditions, say, Neumann or Dirichlet? I always take for granted that plane waves are eigenstates of $H_{0}$, and this is usually what is considered in most problems in physics, but maybe I am just very used to periodic boundary conditions and I don't even notice that other options are possible.