Structure and hidden symmetry in metallic glasses and quasicrystals