I developed a plugin that does this and it helps me earn my livlihood. I usually set the redirect nature to use 307 redirects which are "tempoary redirects" where as 301s are "permanent redirects" and pass SEO. I also have features to treat spider traffic differently than human traffic, which is called cloaking and a potentially dangerous technique but it would work for spiders that do not obey robots.txt and nofollow rules. But for the most part adding a rel=nofollow to a link will prevent a spider from leaving your site to visit the link's location and this can be done for masked or unmasked links.
I use masked links for the tracking capabilities built in. Say I have a product I promote on forums and on my own websites. If I used a masked/shortened link with tracking capabilities I can find out what channels are best sending traffic through that link. If the traffic arrives on the site where I created the link profile, eg: http : // www . hatnohat . com /go/rank-tracker (The site in this case would be hatnohat . com), and that same traffic arrived from searching a search phrase on bing and google and clicked that masked link, then my tracking systems will tell me what search engine the site came from, the internal page they were on when they clicked the link, and the search phrase they used to find that page.
I never mask internal links because as someone else said that will add an unnecessary redirect step. I only mask external links I want to track or geo-target offers/destinations to.