@arielmt @mcc as a point of note, i think this makes much more sense to be written as
touchp() { for file; do mkdir -p "$(dirname "$file")" && >> "$file"; done; }
(a) in "$@" is extraneous
(b) so is touch. unless of course you are actually using touch for touching instead of just making files, but seeing as it's most likely a fresh directory, that's unlikely