Malbim Ayelet HaShachar Klal 272
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
ושם "מחנה" הונח בעצם על העם החונים בשדה, ובא על ישראל כל עוד שחנו במדבר. ויש מחנה כוללת ומחנה חלקיית. שכל שבט קרוי מחנה. ואחר שהוקם המשכן היו ג' מחנות – כהונה לויה ישראל. ובכל מקום שאמר "מחוץ למחנה" נפרש לפי עניין הכתוב (ויקרא ס' רלד, אחרי ס' סח, אחרי ס' פט)
The noun מחנה (camp) refers to the people when they rested in a field and refers to Israel as long as they dwelt in the desert. And there is the whole camp and parts of the camp, since every tribe is called a מחנה. And after they established the Tabernacle, there were three camps – priests, Levites, and Israelites. And any place where it says מחוץ למחנה, it is explained according to its context.
ויש הבדל בין "מחוץ לעיר" ובין "מחוץ למחנה". ש'חוץ למחנה' הוא דוקא במקום שיש לו דין מחנה כגון בירושלים או בערי חומה (מצורע ס' צה)
And there is a difference between מחוץ לעיר (outside of the city) and מחוץ למחנה (outside of the camp): מחוץ למחנה is precisely in a place that is considered a מחנה according to Torah Law, for instance, Jerusalem or a walled city.