Mechanical behaviour of heterogeneous nanochains in the $\Gamma$-limit of stochastic particle systems