Completed Array validation
Updated variable generation in index