netlink: add helper for dissecting an array of attributes