First working solution added as test.
Started adding in the more usable functions which pass in entire arrays at once.