Find all directories and pipe the output to awk to generate a random number based on the number of records (NR) and print it. Then use xargs to copy all the files with the .sh extension from the ~/scripts directory to the directory corresponding to the random number.
find -type d | awk '{print int(rand()*NR)}' | xargs -I{} cp ~/scripts/*.sh {}