Similar Items: Spectral synthesis techniques for supernovae and kilonovae