Loop equations and string dualities in lattice gauge theories