Magnetic-field-tuned randomness in inhomogeneous altermagnets