Assuming that you have a cPanel server with a CentOS7 or CloudLinux 7 operating system, and you want to insert in each home directory a custom directory, here are the commands that help to do that:
cd /home for i in *; do if [[ -d $i/public_html ]]; then mkdir $i/_CUSTOM_DIRECTORY; chown $i: $i/_CUSTOM_DIRECTORY; fi done