I think I'm just overthinking it and I should just need to use addition/subtraction.
if POO is 5000, 5000, 5000 than the limits are -/+6378000.
Too late to test but something like this seems sane:
$nx = mt_rand( -abs( $poo['x'] - $max_distance_x ), $poo['x'] + $max_distance_x );
$ny = mt_rand( -abs( $poo['y'] - $max_distance_y ), $poo['y'] + $max_distance_y );
$nz = mt_rand( -abs( $poo['z'] - $max_distance_z ), $poo['z'] + $max_distance_z );
Wish I knew a more randomized pseudo random generator that wasn't clunky. Though maybe some generation time would be worth it for more entropy.
One thing that would be nice is to not have Y just be random junk, but aligned to the surface.