A unified framework for dynamic density functional and Lattice Boltzmann methods