How does createrawtransaction get the pubkey hash from the provided address?
I think I can answer my own question...

I just saw the code of createrawtransaction and what it does is a Base58 decode, remove the checksum and network bytes and it gets the pubkey hash.