Generally quite limited to specific usages (i.e. w. negative or kl) in the earlier dialects. The CPA form is probably a syriacism.
At Palmyra both mdˁm and mdˁn are used, generally without distinction. In the Palmyrene Trf, however, the former form seems to mean "something" whereas the latter is something like "anything".
In JBA, מידי predominates in the main Talmudic tractates while מידעם is regularly used in the "special" tractates and in the geonic literature, as pointed out by Epstein "Post-Talmudic-Aramaic Lexicography" pp.322f.