Optimize sdb_fmt_array* functions