change usage of parameter assertion

Instead of one array argument, allow a variable argument list
and use `func_get_args()` to retrieve the list. Adjust usages.
change sql2array() to allow different kinds of callbacks