Role of the alloy structure in the magnetic behavior of granular systems