MY and AY flights, whether booked under prime flight numbers or BA codeshares, should earn avios and TPs as usual.
For Indigo or LATAM if booked under BA codeshares, they should earn avios and TPs in accordance with BA been the marketing carrier.
LATAM just booked normally - so not as a BA codeshare connecting to a BA long haul - would earn avios only as they are not part of oneworld.