As for your question of "can you use {variable} to create an array?", it would have been a lot quicker for you to test it and find out.
If you're not going to call change_task(), remove_task() or task_exists() and you're only sending one integer inside an array, you can leave the array empty and use the task ID to pass that integer. It doesn't matter if task IDs collide.
PHP Code:
public client_connect(id)
{
set_task(0.5, "myTask", id, _, _, "b");
}
public myTask(id)
{
server_cmd("kick #%i", get_user_userid(id));
}
__________________