Use an array with index approach for attributes and userData for better clone performance and DOM4 compliance for Node#attributes.