create user array function