Assigning Array and Curve for a large number of curves
Thank you lemon, your script is very useful, it is just what I need from a year ago.
I edited the script (names for a more generic work and not linked to the lamp), Mainpath for curves and Mainclone name for object. I changed the type of displacement to Constant Offset.
import bpy
import bmesh

# Scripting: lemon
# https://blender.stackexchange.com/users/19156/lemon
# Aug 15 '19 at 12:37
# get an existing collection or create it if it does not exist
# if created, the collection is added to the scene main collection
def get_or_create_collection( scene, collection_name ):
    collection = bpy.data.collections.get( collection_name )
    if collection is None:
        collection = bpy.data.collections.new( collection_name )
        scene.collection.children.link( collection )
    return collection

# duplicate an object and link it to a collection
# copy_data allow to know if the objects will share their data or not (are dupli or not)
def duplicate( obj, collection, copy_data ):
    new_obj = obj.copy()
    if copy_data:
        new_obj.data = obj.data.copy()
    collection.objects.link( new_obj )
    return new_obj

# get the scene
scene = bpy.context.scene

# get the base main clone
base_Mainclone = bpy.data.objects[&quot;Mainclone&quot;]

# names of the collections
mainpath_collection_name = &quot;Mainpath&quot;
clones_collection_name = &quot;Created_clones&quot;

# get the source collection
mainpath_collection = bpy.data.collections.get( mainpath_collection_name )

if mainpath_collection is None or base_Mainclone is None:
    print( &quot;will not work&quot; )
else:
# get the destination collection
clones_collection = get_or_create_collection( scene, clones_collection_name )

for mainpath in [r for r in mainpath_collection.objects if r.type == 'CURVE']:
    # Duplicate the base main clone (True =&gt; not linked)
    Mainclone = duplicate( base_Mainclone, clones_collection, True )
    # Set the lamp at the road location so that curve can work
    Mainclone.location = mainpath.location
    # Add the array modifier
    array_modifier = Mainclone.modifiers.new( &quot;array&quot;, 'ARRAY' )
    array_modifier.fit_type = 'FIT_CURVE'
    array_modifier.use_relative_offset = False
    array_modifier.use_constant_offset = True
    array_modifier.constant_offset_displace[0] = 10
    array_modifier.curve = mainpath
    # Add the curve modifier
    curve_modifier = Mainclone.modifiers.new( &quot;curve&quot;, 'CURVE' )
    curve_modifier.object = mainpath

print( 'done' )