fix generation of random elements

[#45016119]

1. Don't use the length of the elements.mass array
to determine the number of elements. Normally typed
arrays are used and these are extended in groups of
10 entries or more at a time.

Instead always use an engine getter method. In this
case:

  engine.getNumberOfElements()

2. Randomly select from non-amino-acid elements
when no specific element is passed to:

  model.addRandomAtom()