Using a much better way to fill an array

thanks to https://github.com/jrudolph

I've still got plenty of scala to learn, and lots of other
language preconceptions to throw off :D