I don't speak or read a word of Hebrew or Aramaic, so this answer is just based on computer research plus some knowledge of Greek (although mostly not koine). I think there are really two good possibilities.
(1) From what I understand of αγαθός, it has a primary meaning, when applied to a human, of something more like "highborn" or "brave." The plain old word for good, like a good cup of coffee or a well-behaved child, would I think be καλος (but I could be wrong because my knowledge isn't mainly of koine). The connotation of αγαθός has to do with greatness (which is the meaning of the speculative Indo-European root). Since the whole dialog starts with ἀγαθέ διδάσκαλε, used as a form of address to Jesus, a reasonable translation, using only the Greek, might be "great teacher" rather than "good teacher." Most likely if you see this form of address in the NT the person is actually addressing Jesus as Rabboni. Mark uses ραββουνι in 10:51. This answer by Susan says:
The frequent title διδάσκαλος (didaskalos) (often vocative: didaskalē) also probably translates rabbi. (See, in addition to John's translation above, e.g. Mt 17:4, where didaskale is used for Mark 9:5's rabbi.)
Note that the meanings of "adonai" and "rabbi" are actually very similar. Adonai means "my lord," while "rabbi" means "my master." That is, a student would address their teacher as "master." So under this hypothesis, the man addresses Jesus obsequiously as Rabboni, my great master, and Jesus, showing his characteristic humility, demurs that he is not a great master, only God is a great master.
Now, when Mark writes it up in Greek, he uses the customary Greek translation for the form of address, because if he used ραββουνι, his Greek-speaking audience won't be able to understand a discussion involving rabbinical word-play about this unfamiliar term. So in order to make this intelligible to Greek speakers, he morphs the words a little bit. The basic point still comes across in the translation, as well as Jesus's humility. The Greek words can be heard as "Why do you call me great? No one is great but God alone." It can also be heard like a Socratic dialog on "what is the good," which could be a familiar literary and philosophical idea to any educated and Hellenized members of Mark's audience.
(2) Looking for similar usages of "good" in the tanakh, I come across examples like (WEB):
Jeremiah 18:10 -- if they do that which is evil in my sight, that they not obey my voice, then I will repent of the good with which I said I would benefit them.
Nahum 1:7 -- Yahweh is good, a stronghold in the day of trouble; and he knows those who take refuge in him.
Micah 6:8 -- He has shown you, O man, what is good.
These seem similar to me in that some of them discuss good in an abstract, generalized sense, and some talk about God as being good. Micah 6:8, in particular, sounds like the same Socratic style of "what is the good?" that Mark has here.
Looking at an interlinear tanakh, all three of these are translations of forms of the Hebrew root twb.
Looking at an Aramaic concordance of the NT, and searching on the English word "good," I get a whole bunch of forms of twb (teth waw beth), including for Mark 10:17-18.
So as a second possibility, this could just be the standard Aramaic word for "good," some form of twb, and the context is what makes it more abstract and special as a divine property of God. This has the advantage of making it possible for the original Aramaic dialog to have been about an abstract "good," as presented in Mark, but the disadvantage that it isn't consistent with the more general likely fact that the Aramaic for this phrase is probably Rabboni.