Fix array bug

1、fix bug: It would occur error when array contains 0 or false
2、add array unit test