For North Macedonia:
Entry in the Republic of North Macedonia for Schengen Visa Holders
Citizens of the following countries are not required to have entry visa for the Republic of North Macedonia:
Third countries with multiple entry short stay Schengen visa type C valid at least 5 (five) days beyond the intended stay in the Republic of North Macedonia.
may stay up to 15 (fifteen) days upon every entry to the territory of the Republic of North Macedonia and the total amount of the subsequent stays must not be longer than 90 days in any 180-day period.
So in their case, it's indeed 15 days max per stay + 90/180 rule.
For Montenegro, all documentation I have found only references the 30-day maximum stay for people holding a valid visa from the Schengen Area, the United States, and a few more. There is no mention of a 90/180 rule or anything similar.
Note however that immigration authorities usually do not like "visa runs", i.e. exactly what you are asking about (exiting the country and coming back the next day or a few days later to start a new period), especially if you use the full length each time, the stays are very close to each other, and/or you do this repeatedly. Anything that would let them think that you are trying to live in the country is usually not a good idea.
This is less of an issue in countries/areas with an explicit rule like the 90/180 rule, but you never know. It will definitely trigger questions about what you are doing in the country (i.e. wouldn't you be working, by any chance?) and how you are able to support yourself for so long without working.
Also, even a visa is not a guarantee that you will be allowed entry, just a permission to seek entry. The IO has discretion to grant or refuse entry based on any additional criteria they see fit.