Did you retain "array" in any way? The method arrayWithArray returns an autoreleased array, which will probably be destroyed shortly after viewDidLoad.
Beyond that, try logging array in viewWillDisappear to see if you're getting what you expect.
Code:
NSLog(@"%@",array);
EDIT: Also note that viewDidLoad is not viewWillAppear - the method viewDidLoad might only get run once, or it might run many times if you contantly alloc and dealloc new controllers of this type or if low memory causes the view to get unloaded.