Another way to look at this, and I think the one that makes the most sense, is that God is in His very nature who He is, and we get our definition of "good" from this. I think the difference between this derived definition of good based on God's nature, and God just possessing the quality of "goodness" (and like qualities, mercy, holiness, etc), is best shown through a good ol' fashioned proof by contradiction.
- Assume God possesses the characteristic of "goodness."
- This means that God is conforming to some higher law of what is right and wrong.
- Therefore God is not the highest authority, for even He must conform to something higher.
Therefore, God must be "goodness" itself. His very nature must define what the word means. He certainly has shown that he has the authority to say what is good and what is not (Genesis 1).
With this definition in mind, we can see that God indeed can do whatever He wants because His will is not bound by anyone or anything else as we see in Daniel 4:35:
“And all the inhabitants of the earth are accounted as nothing, but He does according to His will in the host of heaven and among the inhabitants of earth; and no one can ward off His hand or say to Him, ‘What hast Thou done?’”
We can further see that while God can do whatever He wants, He is still completely good, because what He wants becomes what goodness is. The good news for us is that God loves us and does not change (The definition of goodness and the fact that He loves us never changes):
For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life. -John 3:16
Jesus Christ is the same yesterday and today and forever. -Hebrews 13:8
Running with this idea, if He were to commit an act that was not merciful (and thus not good if for no other reason than He lied about His mercifulness) then He would not be merely breaking some higher "rule," but in essence He would have denied His very nature. This, according to common sense and (above all) scripture, is impossible.
If we are faithless, He remains faithful; He cannot deny Himself. -2 Timothy 2:13