I have looked at the documentation for UniObjects for Java and VB and do not see a way to search a UniDynArray without resorting to a loop.
Is that the intention you think to rely on the API language (i.e. Java)?
This is what I ended up doing in VBScript.
If InStr(daShipAlones.TextValue, sDocNum) = 0 Then
....
End If