Add option to return array length if -1 is passed as index

Note that this enhancement also requires changes to picojson (https://github.com/teliseo/picojson/commit/c3bbd9ea83faa4636d84a40f42322e7a823845fa).