Fixes #9 - made arrays work too

NOTE: This changes the interface, so you will likely have to update
code.  Apologies.