Mrk 421 as a case study for TeV and X-ray variability in leptohadronic models