Implement array factory in Connection class