The OED, s.v, for (prep., conj.), sense 19, says
a. In the character of, in the light of, as equivalent to; esp. to
introduce the complement after verbs of incomplete predication, e.g.
to have, hold, etc. (see those verbs), where as or as being may
generally be substituted. ...
b. So with an adjective, as in to take for granted, to leave for dead, etc. for certain, for sure, †for wiss, see those adjectives
So the OED accepts it as a construction that "for" occurs in, but I would say that it is obsolete except for a limited set of words following (also for free), and should be treated as an idiom.
Likewise s.v. in, prep:
36. With a substantive (or adj.), forming an adv.phr., e.g. in charity, in duty, in honour; in right; in common, in general, in
especial; in fact, in (all) probability, in truth, in faith; in
conclusion, in fine; in haste; in any case, in every way; in (all) the
world. See the ns.
The OED doesn't distinguish nouns from adjectives in this construction, and again I would suggest that there is a limited range of adjectives that occur, so again, it should be treated as an idiom.