For the geometry pipeline functions and geometry types, it is generally more clear to allocate the arrays as local variables, then create the geometry attributes at the end of the function since they are kinda the return value.