def METHOD_NAME(func):
    @type_callable(func)
    def func_type(context):
        def typer(ary, idx, val):
            out = get_array_index_type(ary, idx)
            if out is not None:
                res = out.result
                if context.can_convert(val, res):
                    return res
            return None
        return typer
    _ = func_type
    @lower_builtin(func, types.Buffer, types.Any, types.Any)
    # pylint: disable=too-many-locals
    def func_impl(context, builder, sig, args):
        """
        array[a] = scalar_or_array
        array[a,..,b] = scalar_or_array
        """
        aryty, idxty, valty = sig.args
        ary, idx, val = args
        if isinstance(idxty, types.BaseTuple):
            index_types = idxty.types
            indices = cgutils.unpack_tuple(builder, idx, count=len(idxty))
        else:
            index_types = (idxty,)
            indices = (idx,)
        ary = make_array(aryty)(context, builder, ary)
        # First try basic indexing to see if a single array location is denoted.
        index_types, indices = normalize_indices(
            context, builder, index_types, indices
        )
        dataptr, shapes, _strides = basic_indexing(
            context,
            builder,
            aryty,
            ary,
            index_types,
            indices,
            boundscheck=context.enable_boundscheck,
        )
        if shapes:
            raise NotImplementedError("Complex shapes are not supported")
        # Store source value the given location
        val = context.cast(builder, val, valty, aryty.dtype)
        operation = None
        if isinstance(aryty.dtype, types.Integer) and aryty.dtype.signed:
            operation = iop
        elif isinstance(aryty.dtype, types.Integer) and not aryty.dtype.signed:
            operation = uop
        elif isinstance(aryty.dtype, types.Float):
            operation = fop
        if operation is None:
            raise TypeError("Atomic operation not supported on " + str(aryty))
        return _atomic_rmw(context, builder, operation, aryty, val, dataptr)
    _ = func_impl
    return func