Add toArray, toDict and toItem helpers