Alter by Boolean Sequence

Chop list at indices where there is a change in value
Replace trues sequentially with elements from another list
ls1 = List.Flatten(lst1,-1);
ls2 = List.GroupByKey(0..(List.Count(ls1)-1),ls1);
ls3 = List.SortByKey(ls2["groups"],ls2["unique keys"])["sortedList"];
ls4 = [List.OfRepeatedItem(null,List.CountFalse(ls1)),lst2];
ls5 = List.SortByKey(List.Flatten(ls4,-1),List.Flatten(ls3,-1));
ls6 = List.Chop(ls5["sortedList"],List.Count(lst1<1>));
List chopped to correspond with true/false sequence
bln2 = List.Sublists(bln1,0..1,1);
bln3 = List.AllTrue(bln2<1>) ? false
:List.LastItem(bln2<1>) == true ? true
:List.FirstItem(bln2<1>) == true ? true
:false;
ind0 = List.AllIndicesOf(bln3,true)+1;
ind1 = List.Flatten([0,ind0,List.Count(bln1)],-1);
ind2 = List.RestOfItems(ind1)-List.DropItems(ind1,-1);
lst1 = List.Chop(lst,ind2);
Variation in which the first item varies from the rest
bln2 = List.Sublists(bln1,0..1,1);
bln3 = List.AllFalse(bln2<1>) ? false
: List.LastItem(bln2<1>) == true ? true
: List.FirstItem(bln2<1>) == true ? false
: true;
ind0 = List.AllIndicesOf(bln3,false)+1;
ind1 = List.Flatten([0,ind0,List.Count(bln1)],-1);
ind2 = List.RestOfItems(ind1)-List.DropItems(ind1,-1);
lst1 = List.Chop(lst,ind2);