Intrinsic inhomogeneities and effects of resistive switching in doped manganites