in reply to simple getpwent/array question

My problem more precisely is: I haven't yet figured out the syntax to load an array with an iterating function like getpwent?