If you know the size in advance that's not the optimal method, though.
struct array *make_str_array( char *x, int size ) { int i; struct array *x = allocate_array_no_init( size ); struct svalue *ptr = x->item; for( i=size; i>0; i-- ) { ptr->type = PIKE_T_STRING; ptr->subtype = 0; ptr->u.string = make_shared_string( *x ); x++; ptr++; } return x; }