for ($i= 0; $i < count($arr); $i++) {
$document = $modx->getObject('modResource',$arr[$i]);
}if ($document = $modx->getObject('modResource',$arr[$i])){
//do somthing with the document
}if ($collection = $modx->getCollection('modResource',array('id:IN' => $arr))){
foreach ($collection as $document){
//do something with the document
}
}