Distributed quantum sensing with optical lattices