Moved argsToArray to core.utils

Just a bit of refactoring to allow other plugins to use argsToArray.