attributeArray function can accept attribute keys