My memory can’t recall anything in the Constitution that requires a winner-take-all system. I don’t know the history of the electoral college in this matter, though.
Did the early republic also have a winner-take-all system?
I'm no expert on Federal Election Law, but I doubt that Maryland's scheme would hold up to a challenge.