Structural elements in particle physics and statistical mechanics