Refactored test to not use hpx::for_each

Signed-off-by: K-ballo <k@fusionfenix.com>