Generalized coupled dipole method for thermal far-field radiation