Encounter circumstances affect encounter difficulty, not CR
The technical answer to your question is: no. Monsters are not generally assumed to have pre-used abilities before the beginning of an encounter. In exceptional cases that deviate from this, their rules text explicitly tells you so, as in the case of the archmage that you linked.
The CR given in the monster manual reflects all its abilities, including its spellcasting abilities. When and how they use them depends on the story and situation. They may already have used some at the beginning of an encounter, or they may not. The DMG instructs you to adjust encounter difficulty based on the circumstances on page 84f:
An encounter can be made easier or harder based on the choice of location and the situation. (...) Situational drawbacks include the following:
- The whole party is surprised, and the enemy isn't.
- The enemy has cover, and the party doesn't.
Wether your NPC spellcaster has pre-cast mage armor on themselves when he meets the PCs will depend on the story. Do they cast the spell on themselves every morning, maybe with the prior day's unused spell slots? After it runs out, will they refresh it? When do the PCs encounter them, in morning or in the evening? If in the evening, will the NPC have renewed mage armor and be down an extra spell slot? None of this changes his challenge rating, but it might change the encounter difficulty. (Although in my reconning, mage armor is not enough of a factor to worry about).
Challenge Rating accuracy
There is a more important, practical reason, why you should not worry about CR: fidgeting with CR is a horrible use of your time. CRs are notoriously rough and inaccurate for multiple reasons listed below. Slight changes in stats take a long time to work out and are very unlikely to affect the game enough to matter compared to the large error margins CRs already have.
I can only guess how long Benjamin took to work out the calculation for his answer, but my own experience with calculating CRs for monster conversions from older editions is: it can easily take half an hour. It may be worth it for creating a monster for reuse, but not for minor changes or one-time encounters. It also is quite telling that Benjamin reports in a comment on his own answer that he "completely stopped calculating CR for homebrew monsters or doing adventure budgeting". Bravo, I say!
My recommendation is to just use the CR as quoted, and move on with the game. Here are some more details on why CRs are not that useful:
The DMG CR rules are inaccurate
The rules in the DMG about calculating CRs are by virtue of the complexity of the task rough and approximate. There are many examples, of monsters in the monster manual, for which the CR as calculated by these rules differs from the CR cited in the Monster Manual. This is because the game's designers tried to assess the danger of a monster more wholistically.
The MM CRs are inaccurate
Some monsters in the monster manual are much more deadly than others of the same CR. Simulated combats also confirm that across CRs against an "average" group of adventurers, there is wide variance how deadly monsters of the same CR are. Some monsters have deadly abilities that can leave characters mutilated for a long time, far stronger than their CR suggests.
The whole concept of CR is inaccurate
To a large extent how dangerous a monster is depends on how the abilities of the monster match up against those of the PCs. For example, a CR of a monster with a long range attack and flying may widely underestimate how dangerous such a monster is for a party that lacks either. The single CR number cannot reflect this.
The DMG even warns you about this on page 82:
some monsters have features that might be
difficult or im possible for lower-level characters to overcome.
For example, a rakshasa has a challenge rating of 13 and is
immune to spells of 6th level and lower. Spellcasters of 12th
level or lower have no spells higher than 6th level, meaning
that they won't be able to affect the rakshasa with their
magic, putting the adventurers at a serious disadvantage.
Such an encounter would be significantly tougher for the
party than the monster's challenge rating might suggest.