I have an array of objects that is created by my script and I am trying to copy that array into a new array and then store it in scriptDb using the following function:
ScriptDb only stores map objects. You could however store a map that contains an array!
ScriptDb
You can use arrays to save several objects in a single call using db.saveBatch.
db.saveBatch