Added is_map function to check is array map or plain array

Fixes #87 (bug with incorrect packing of mixed arrays).

Patch is pretty straightforward.