Changing malloc array return to static array return