Handle nested attribute arrays

Fixes #64