You can do so, but I wouldn't recommand that.
It is better to use less while loops, because they are sad to slow down the code.
Zapan@work even recommanded to use only one while loop, and to call all functions from within this while loop. The called functions wouldn't have any while loop then, but are repeatedly called from the one and only while loop.

This is more appropriate than your example, IMO:

function npc()
{
while(1)
{
if(condition_1)
{
function_1;
}
if(condition_2)
{
function_2;
}
...
wait(1);
}
}

function function_1()
{
...//Do things without any while loops
}