I would like my MAC addresses on my Mac OS X (iMac) and iOS devices (iPhone, iPad) to be randomized on boot. I have no idea how to generate the random MAC, nor to insert it into the boot process. Any help would be greatly appreciated!
Besides questioning why, and thinking that this will be more work than will probably benefit you, realize that a truly random MAC will cause problems.
The main problem I see is grabbing by accident the same MAC as someone on the network you're on, or will later join. Also, part of the MAC is a hardware manufacturer identifier, so a truly 'random' MAC would possibly cause problems.
To change the MAC address of a jailbroken iOS device (one-time, not quite on-every-boot):
Generate a MAC address.
openssl rand -hex 6should work.
Ensure that the MAC address is unicast and "locally administered", which means the second digit must be one of 2, 6, A or E (x2:xx:xx:xx:xx:xx). This will prevent weird things from happening.
On a rooted iOS device, run:
su - nvram wifiaddr=4a:1c:ff:c1:d0:c0
Reboot the device.
After reboot, my iOS device reported that the iTunes library was corrupted, and was unable to sync with iTunes. Remove these files, and the device should regenerate the iTunes library from the media on disk (please be careful):
cd /var/mobile/Media/iTunes_Control/iTunes mv iTunesCDB iTunesCDB-backup mv iTunesControl iTunesControl-backup mv iTunesPrefs iTunesPrefs-backup
Preface: This is not a complete answer to your question, but as it has not yet been mentioned I believe it may be a beneficial addition here.
Homebrew is a package manager for OSX/macOS (much like aptitude for Debian Linux). One of the many packages you can get through it is spoof-mac. You'll need to read the instructions on https://brew.sh for the installation process, but it's pretty easy.
Once homebrew is installed, you get get spoof-mac by typing (In the terminal) "brew install spoof-mac"
You can now easily randomize you mac address by typing "sudo spoof-mac randomize --local $$$" replacing $$$ with whatever your network interface is.
As I mentioned up front, this is only part of the answer, but as homebrew allows the easy install of thousands of linux programs this should still get you closer to your goal.