serialize array