Quantum scattering from arbitrary boundaries