Added array() feature

Hi,

I think a ``toArray()`` can be useful to ease metadatas access in PHP,
and this contribution should be enough for the majority of needs.

What do you think ?