serialize array as ZendAMF