I've long had similar questions. There's various explict theological points about grammar scattered throughout the Midrashim, but I've yet to find a work which compiles them into a complete framework.
The closest text to what you're looking for that I know of is the Sefer Yetzirah, specifically R. Aryeh Kaplan's translation and commentary. It's certainly not easy to grasp, but as the work is Abraham's treatise on how G-d created the universe using the Hebrew language, I suspect much grammar can be and is explained.
Excerpt of Kaplan explaing the origin (or at least theological relation) of a few uses of letter prefixes and suffixes. The beginning gives the necessary context:
The Kabbalists normatively associate the name Yah with Wisdom (Chakhmah). Actually, however, only the first letter of this name, the Yud, designates Wisdom. The second letter, Heh designates Understanding, the feminine principle. The reason why this name as a whole is used to designate Wisdom is because Wisdom cannot be grasped except when it is clothed in Understanding. For this reason, the Yud alone is not used as the name for Wisdom, but rather, the Yud combined with the Heh.
There are a number of reasons why these two letters represent
Wisdom and Understanding respectively. Yud has the primary form of a simple point. This alludes to the fact that Wisdom is simple and undifferentiated. The numerical value of Yud is 10, indicating that all Ten Sefirot are included in the simple nature of Wisdom.
At the beginning of a word, the letter Yud indicates the masculine future. This is related to the teaching, "Who is wise? He who perceives the future."
At the end of a word, when used as a suffix, the letter Yud means
"me" or "my." Wisdom is the essential nature of the individual
belonging to him alone. As such, it is the ultimate "my." The same
is true of the Sefirah of Wisdom (Chakhmah) with respect to the Infinite Being.
Heh has a numerical value of 5, alluding to the five fingers of
the hand, As such, it represents Understanding, the hand that holds
Wisdon, distributing and channeling it.
At the beginning of a word, the prefix Heh means "the." It is the definite article, that specifies and delineates an object. Like a hand, the definite article holds and specifies a concept that is specific rather than general. At the end of a word, Heh indicates the feminine possessive, her." This is because Understanding is the domain of the Feminine Essence.