element_vec function

Apply a function to the fields of an element object