import csv
import json

def csv_to_json_array(csv_file_path, json_file_path=None):
    # Read CSV file and convert rows to a list of dictionaries
    with open(csv_file_path, mode='r', encoding='utf-8') as csv_file:
        reader = csv.DictReader(csv_file)
        data = list(reader)

    # Convert to JSON string
    json_data = json.dumps(data, indent=4)

    # Optional: Save to a file if a output path is provided
    if json_file_path:
        with open(json_file_path, mode='w', encoding='utf-8') as json_file:
            json_file.write(json_data)

    return data, json_data

# Example Usage
data_array, json_string = csv_to_json_array('nypl.csv', 'nypl.json')

# Output the result string
print(json_string)