We theoretically study the conductivity in arrays of metallic grains due to the variable-range multiple cotunneling of electrons with short-range (screened) Coulomb interaction. The system is supposed to be coupled to random stray charges in the dielectric matrix that are only loosely bounded to their spatial positions by elastic forces. The flexibility of the stray charges gives rise to a polaronic effect, which leads to the onset of Arrhenius-like conductivity behaviour at low temperatures, replacing conventional Mott variable-range hopping. The effective activation energy logarithmically depends on temperature due to fluctuations of the polaron barrier heights. We present the unified theory that covers both weak and strong polaron effect regimes of hopping in granular metals and describes the crossover from elastic to inelastic cotunneling.