Boundary integral equation methods for superhydrophobic flow and integrated photonics