Text this: Efficient calculation of Coulomb matrix elements for bilayers of confined charge carriers with arbitrary spatial separation